ESPHome  2024.11.0
honeywell_hih.h
Go to the documentation of this file.
1 // Honeywell HumidIcon I2C Sensors
2 #pragma once
3 
7 
8 namespace esphome {
9 namespace honeywell_hih_i2c {
10 
12  public:
13  void dump_config() override;
14  float get_setup_priority() const override;
15  void loop() override;
16  void update() override;
17 
18  void set_temperature_sensor(sensor::Sensor *temperature_sensor) { this->temperature_sensor_ = temperature_sensor; }
19  void set_humidity_sensor(sensor::Sensor *humidity_sensor) { this->humidity_sensor_ = humidity_sensor; }
20 
21  protected:
22  bool measurement_running_{false};
25 
26  private:
27  void read_sensor_data_();
28  void start_measurement_();
29  bool is_measurement_ready_();
30  void measurement_timeout_();
31 };
32 
33 } // namespace honeywell_hih_i2c
34 } // namespace esphome
This class simplifies creating components that periodically check a state.
Definition: component.h:283
void set_humidity_sensor(sensor::Sensor *humidity_sensor)
Definition: honeywell_hih.h:19
Implementation of SPI Controller mode.
Definition: a01nyub.cpp:7
void set_temperature_sensor(sensor::Sensor *temperature_sensor)
Definition: honeywell_hih.h:18
Base-class for all sensors.
Definition: sensor.h:57
This Class provides the methods to read/write bytes from/to an i2c device.
Definition: i2c.h:133