11static constexpr uint8_t REG_TEMPERATURE_LOW = 0x00;
12static constexpr uint8_t REG_TEMPERATURE_HIGH = 0x01;
13static constexpr uint8_t REG_HUMIDITY_LOW = 0x02;
14static constexpr uint8_t REG_HUMIDITY_HIGH = 0x03;
15static constexpr uint8_t REG_RESET_DRDY_INT_CONF = 0x0E;
16static constexpr uint8_t REG_MEASUREMENT_CONFIGURATION = 0x0F;
19static constexpr uint8_t MEAS_TRIG = 0x01;
20static constexpr uint8_t MEAS_CONF_TEMP = 0x02;
21static constexpr uint8_t MEAS_CONF_HUM = 0x04;
24 const uint8_t data = 0x00;
31void HDC2080Component::dump_config() {
32 ESP_LOGCONFIG(TAG,
"HDC2080:");
34 LOG_UPDATE_INTERVAL(
this);
35 LOG_SENSOR(
" ",
"Temperature", this->temperature_sensor_);
36 LOG_SENSOR(
" ",
"Humidity", this->humidity_sensor_);
39void HDC2080Component::update() {
40 uint8_t
data = MEAS_TRIG;
41 if (this->temperature_sensor_ !=
nullptr && this->humidity_sensor_ ==
nullptr) {
42 data = MEAS_TRIG | MEAS_CONF_TEMP;
43 }
else if (this->temperature_sensor_ ==
nullptr && this->humidity_sensor_ !=
nullptr) {
44 data = MEAS_TRIG | MEAS_CONF_HUM;