ESPHome 2026.11.0b6
Loading...
Searching...
No Matches
aht10.h
Go to the documentation of this file.
1#pragma once
2
3#include <utility>
4
8
9namespace esphome::aht10 {
10
12
13class AHT10Component final : public PollingComponent, public i2c::I2CDevice {
14 SUB_SENSOR(temperature)
15 SUB_SENSOR(humidity)
16
17 public:
18 void setup() override;
19 void update() override;
20 void dump_config() override;
21 void set_variant(AHT10Variant variant) { this->variant_ = variant; }
22
23 protected:
25 unsigned read_count_{};
26 void read_data_();
27 void restart_read_();
29};
30
31} // namespace esphome::aht10
virtual void setup()
Where the component's initialization should happen.
Definition component.cpp:84
This class simplifies creating components that periodically check a state.
Definition component.h:532
This Class provides the methods to read/write bytes from/to an i2c device.
Definition i2c.h:144
static void uint32_t
uint16_t temperature
Definition sun_gtil2.cpp:12