ESPHome 2026.11.0b6
Loading...
Searching...
No Matches
wts01.h
Go to the documentation of this file.
1#pragma once
2
7
8namespace esphome::wts01 {
9
10constexpr uint8_t PACKET_SIZE = 9;
11
12class WTS01Sensor final : public sensor::Sensor, public uart::UARTDevice, public Component {
13 public:
14 void loop() override;
15 void dump_config() override;
16
17 protected:
18 void process_packet_(const uint8_t *packet);
19
21};
22
23} // namespace esphome::wts01
Collects fixed length binary frames of N bytes that start with the header bytes HEADER....
Base-class for all sensors.
Definition sensor.h:48
void process_packet_(const uint8_t *packet)
Definition wts01.cpp:19
FrameReader< PACKET_SIZE, 0x55, 0x01, 0x01, 0x04 > reader_
Definition wts01.h:20
void dump_config() override
Definition wts01.cpp:17
void loop() override
Definition wts01.cpp:9
constexpr uint8_t PACKET_SIZE
Definition wts01.h:10