esphome / issues

Issue Tracker for ESPHome
https://esphome.io/
290 stars 34 forks source link

HTU21D component does not return correct temperature, plus heater function does not seem to work #5519

Closed MisterScience5 closed 1 month ago

MisterScience5 commented 5 months ago

The problem

I've built a humidity control system for an old "dumb" dehumidifer, and employed a HTU21D module for this.

The module reports correct %RH, but the temperature is fixed out of range. I tried two modules, the first module reported correct %RH, but a fixed temperature of -46.8°C (the lowest possible value, 0x0000). Presuming the module was faulty, I swapped it for another, however this one exhibited the same behaviour with correct %RH, except the temperature is now fixed at 128.9°C (the highest possible value, 0xFFFC).

I would have expected this to return an error as the module should not post the ACK bit if the reading is not complete, however the measurements are reported as valid on both modules.

Considering both modules report valid and consistent %RH I am thinking there may be a challenge in the component code, however having looked it over I can't immediately spot anything wrong.

Setting the heater to on also seems to make communications with the module stop, however I have not tested this extensively.

Which version of ESPHome has the issue?

2024.2.0

What type of installation are you using?

Home Assistant Add-on

Which version of Home Assistant has the issue?

2024.2.2

What platform are you using?

ESP8266

Board

Wemos D1 Mini

Component causing the issue

htu21d

Example YAML snippet

i2c:
  sda: D7
  scl: D6
  scan: true
  id: bus_a

sensor:
  - platform: htu21d
    id: hum_temp_sensor
    temperature:
      name: "Temperature"
      id: temp_sensor
    humidity:
      name: "Humidity"
      id: hum_sensor
    heater:
      name: "Heater"
      id: hum_sensor_heat
    update_interval: 10s

Anything in the logs that might be useful for us?

The component returns no error, and reports the measurements as valid.

Additional information

No response

github-actions[bot] commented 1 month ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.