ESPHome 2026.2.3
Loading...
Searching...
No Matches
aht10.h
Go to the documentation of this file.
1#pragma once
2
3#include <utility>
4
8
9namespace esphome {
10namespace aht10 {
11
13
15 public:
16 void setup() override;
17 void update() override;
18 void dump_config() override;
19 void set_variant(AHT10Variant variant) { this->variant_ = variant; }
20
21 void set_temperature_sensor(sensor::Sensor *temperature_sensor) { temperature_sensor_ = temperature_sensor; }
22 void set_humidity_sensor(sensor::Sensor *humidity_sensor) { humidity_sensor_ = humidity_sensor; }
23
24 protected:
28 unsigned read_count_{};
29 void read_data_();
30 void restart_read_();
31 uint32_t start_time_{};
32};
33
34} // namespace aht10
35} // namespace esphome
This class simplifies creating components that periodically check a state.
Definition component.h:512
void set_variant(AHT10Variant variant)
Definition aht10.h:19
void dump_config() override
Definition aht10.cpp:153
sensor::Sensor * temperature_sensor_
Definition aht10.h:25
sensor::Sensor * humidity_sensor_
Definition aht10.h:26
void set_temperature_sensor(sensor::Sensor *temperature_sensor)
Definition aht10.h:21
void set_humidity_sensor(sensor::Sensor *humidity_sensor)
Definition aht10.h:22
This Class provides the methods to read/write bytes from/to an i2c device.
Definition i2c.h:133
Base-class for all sensors.
Definition sensor.h:43
Providing packet encoding functions for exchanging data with a remote host.
Definition a01nyub.cpp:7