ESPHome 2026.2.3
Loading...
Searching...
No Matches
wts01.h
Go to the documentation of this file.
1#pragma once
2
6
7namespace esphome {
8namespace wts01 {
9
10constexpr uint8_t PACKET_SIZE = 9;
11
12class WTS01Sensor : public sensor::Sensor, public uart::UARTDevice, public Component {
13 public:
14 void loop() override;
15 void dump_config() override;
16
17 protected:
19 uint8_t buffer_pos_{0};
20
21 void handle_char_(uint8_t c);
22 void process_packet_();
23};
24
25} // namespace wts01
26} // namespace esphome
Base-class for all sensors.
Definition sensor.h:43
void handle_char_(uint8_t c)
Definition wts01.cpp:27
uint8_t buffer_[PACKET_SIZE]
Definition wts01.h:18
void dump_config() override
Definition wts01.cpp:25
void loop() override
Definition wts01.cpp:15
constexpr uint8_t PACKET_SIZE
Definition wts01.h:10
Providing packet encoding functions for exchanging data with a remote host.
Definition a01nyub.cpp:7