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;
29void HDC2080Component::dump_config() {
30 ESP_LOGCONFIG(TAG,
"HDC2080:");
32 LOG_UPDATE_INTERVAL(
this);
33 LOG_SENSOR(
" ",
"Temperature", this->temperature_sensor_);
34 LOG_SENSOR(
" ",
"Humidity", this->humidity_sensor_);
37void HDC2080Component::update() {
38 uint8_t data = MEAS_TRIG;
39 if (this->temperature_sensor_ !=
nullptr && this->humidity_sensor_ ==
nullptr) {
40 data = MEAS_TRIG | MEAS_CONF_TEMP;
41 }
else if (this->temperature_sensor_ ==
nullptr && this->humidity_sensor_ !=
nullptr) {
42 data = MEAS_TRIG | MEAS_CONF_HUM;