ESPHome  2024.11.0
sht3xd.h
Go to the documentation of this file.
1 #pragma once
2 
6 
7 #include <cinttypes>
8 
9 namespace esphome {
10 namespace sht3xd {
11 
14  public:
15  void set_temperature_sensor(sensor::Sensor *temperature_sensor) { temperature_sensor_ = temperature_sensor; }
16  void set_humidity_sensor(sensor::Sensor *humidity_sensor) { humidity_sensor_ = humidity_sensor; }
17 
18  void setup() override;
19  void dump_config() override;
20  float get_setup_priority() const override;
21  void update() override;
22  void set_heater_enabled(bool heater_enabled) { heater_enabled_ = heater_enabled; }
23 
24  protected:
25  enum ErrorCode {
26  NONE = 0,
30  } error_code_{NONE};
31 
34  bool heater_enabled_{true};
35  uint32_t serial_number_{0};
36 };
37 
38 } // namespace sht3xd
39 } // namespace esphome
sensor::Sensor * temperature_sensor_
Definition: sht3xd.h:32
void set_temperature_sensor(sensor::Sensor *temperature_sensor)
Definition: sht3xd.h:15
This class simplifies creating components that periodically check a state.
Definition: component.h:283
enum esphome::sht3xd::SHT3XDComponent::ErrorCode NONE
float get_setup_priority() const override
Definition: sht3xd.cpp:75
void dump_config() override
Definition: sht3xd.cpp:48
Implementation of a i2c functions for Sensirion sensors Sensirion data requires crc checking...
Definition: i2c_sensirion.h:17
void set_heater_enabled(bool heater_enabled)
Definition: sht3xd.h:22
This class implements support for the SHT3x-DIS family of temperature+humidity i2c sensors...
Definition: sht3xd.h:13
void set_humidity_sensor(sensor::Sensor *humidity_sensor)
Definition: sht3xd.h:16
Implementation of SPI Controller mode.
Definition: a01nyub.cpp:7
Base-class for all sensors.
Definition: sensor.h:57
sensor::Sensor * humidity_sensor_
Definition: sht3xd.h:33