ESPHome 2026.11.0b6
Loading...
Searching...
No Matches
smt100.h
Go to the documentation of this file.
1#pragma once
2
7
8namespace esphome::smt100 {
9
11 // 33 characters plus the NUL; the longest line, "15000,80.00,100.00,-20.00,12.00", is 31
12 static constexpr uint16_t LINE_BUFFER_SIZE = 34;
13
14 public:
15 SMT100Component() = default;
16
17 void dump_config() override;
18 void loop() override;
19 void update() override;
20
21 SUB_SENSOR(counts)
22 SUB_SENSOR(permittivity)
23 SUB_SENSOR(temperature)
24 SUB_SENSOR(moisture)
25 SUB_SENSOR(voltage)
26
27 protected:
28 LineReader<LINE_BUFFER_SIZE, '\r', '\n'> line_reader_;
29
31};
32
33} // namespace esphome::smt100
Collects bytes into NUL terminated lines of up to N - 1 characters; IGNORE_CHAR bytes are skipped and...
Definition line_reader.h:15
This class simplifies creating components that periodically check a state.
Definition component.h:532
SUB_SENSOR(counts) SUB_SENSOR(permittivity) SUB_SENSOR(temperature) SUB_SENSOR(moisture) SUB_SENSOR(voltage) protected uint32_t last_transmission_
Definition smt100.h:30
static void uint32_t
uint16_t temperature
Definition sun_gtil2.cpp:12