ESPHome 2026.5.0-dev
Loading...
Searching...
No Matches
shtcx.h
Go to the documentation of this file.
1#pragma once
2
6
7namespace esphome::shtcx {
8
14
17 public:
18 void set_temperature_sensor(sensor::Sensor *temperature_sensor) { temperature_sensor_ = temperature_sensor; }
19 void set_humidity_sensor(sensor::Sensor *humidity_sensor) { humidity_sensor_ = humidity_sensor; }
20
21 void setup() override;
22 void dump_config() override;
23 void update() override;
24 void soft_reset();
25 void sleep();
26 void wake_up();
27
28 protected:
31 uint16_t sensor_id_;
33};
34
35} // namespace esphome::shtcx
This class simplifies creating components that periodically check a state.
Definition component.h:602
Base-class for all sensors.
Definition sensor.h:47
This class implements support for the SHT3x-DIS family of temperature+humidity i2c sensors.
Definition shtcx.h:16
void set_temperature_sensor(sensor::Sensor *temperature_sensor)
Definition shtcx.h:18
sensor::Sensor * humidity_sensor_
Definition shtcx.h:30
sensor::Sensor * temperature_sensor_
Definition shtcx.h:29
void dump_config() override
Definition shtcx.cpp:50
void set_humidity_sensor(sensor::Sensor *humidity_sensor)
Definition shtcx.h:19
@ SHTCX_TYPE_SHTC1
Definition shtcx.h:11
@ SHTCX_TYPE_UNKNOWN
Definition shtcx.h:12
@ SHTCX_TYPE_SHTC3
Definition shtcx.h:10