ESPHome 2025.5.0
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 float get_setup_priority() const override;
20 void set_variant(AHT10Variant variant) { this->variant_ = variant; }
21
22 void set_temperature_sensor(sensor::Sensor *temperature_sensor) { temperature_sensor_ = temperature_sensor; }
23 void set_humidity_sensor(sensor::Sensor *humidity_sensor) { humidity_sensor_ = humidity_sensor; }
24
25 protected:
29 unsigned read_count_{};
30 void read_data_();
31 void restart_read_();
32 uint32_t start_time_{};
33};
34
35} // namespace aht10
36} // namespace esphome
This class simplifies creating components that periodically check a state.
Definition component.h:301
void set_variant(AHT10Variant variant)
Definition aht10.h:20
void dump_config() override
Definition aht10.cpp:161
sensor::Sensor * temperature_sensor_
Definition aht10.h:26
sensor::Sensor * humidity_sensor_
Definition aht10.h:27
void set_temperature_sensor(sensor::Sensor *temperature_sensor)
Definition aht10.h:22
float get_setup_priority() const override
Definition aht10.cpp:159
void set_humidity_sensor(sensor::Sensor *humidity_sensor)
Definition aht10.h:23
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:57
Providing packet encoding functions for exchanging data with a remote host.
Definition a01nyub.cpp:7