Open t-az opened 1 year ago
I have the same issue. I made many forum posts and issues about this but for some reason the EspHome team persistently ignores this problem. I had multiples of HTU21D devices in my house. when HA notifies update, I update. After updating EspHome and updating the firmware my HTU21D devices stopped working. There are some I havent updated since EspHome version 2021.9.3 and they are working fine so I can not add any more fetures to those devices. On my laptop I have installed EspHome 2021.9.3 but for some reason it requires that platformio core 6 must be installed. That is very stupid. EspHome 2021.9.3 requires platformio 5.2.0 but it will not compile unless I install platformio 6 which should not even be compatible. I think the problem about HTU21D with EspHome is with platformio v 6.
On 2021 I used to be able to install on my laptop with EspHome cli a HTU21D device without problem. Now for some reason it won't even compile if I don't install platformio core 6 which is totally stupid. platoformio 5.2.0 should be enough for EspHome 2021.9.3.
Try this yourself on your computer. install old version of esphome with pip install esphome==2021.9.3 pip install platformio==5.2.0 esphome compile yourcode.yaml esphome upload yourcode.yaml --device 192.168..
try to get this to work maybe it will work for you. This used to work for me.
for some reason now it complains about platformio6 and maybe platformio6 is the problem, I'm not sure. When you run esphome compile, it runs platformio run -d yourcode which then complains about core 6. There has to be a way to run EspHome 2021.9.3 with platformio 5.2.0 If you can get that to work I think, HTU21D will work that way.
Figured I'd post a resolution I found if anyone else has this issue. I was able to set the "scan" boolean under my i2c configuration to "false" and manually defined the address of the HTU21D and that resolved the issue. Sensor is now communicating using the latest version of ESPHome. Weird bug but whatever.
Did not work for me specifically because the address is already set...
The problem
HTU21D temperature and humidity sensor fails to connect over i2c on the latest release of ESPHome (which I believe is 2023.3.2, what ever version has the "latest" tag in Docker). When trying to connect I get an error message saying "Communication with HTU21D failed!" Rolling back to 2023.2.4 resolves this issue for me and gets the sensor working again. Specs for my system are below, let me know if you need any more info.
Log from latest release:
Log from 2023.2.4
Which version of ESPHome has the issue?
Latest
What type of installation are you using?
Docker
Which version of Home Assistant has the issue?
No response
What platform are you using?
ESP32
Board
SparkFun ESP32-S2 Thing Plus
Component causing the issue
i2c
Example YAML snippet
Anything in the logs that might be useful for us?
No response
Additional information
No response