I have several ESPhome devices but one is giving me issues. If I view the logs of the device on the ESPhome menu everything looks fine. It connects to the device and the logs show the state changes. But in HA the entities show as “unavailable” and I’m getting this in my logs:
Logger: homeassistant.components.sensor
Source: helpers/entity_platform.py:520
Integration: Sensor ([documentation](https://www.home-assistant.io/integrations/sensor), [issues](https://github.com/home-assistant/home-assistant/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+sensor%22))
First occurred: 10:51:34 PM (6 occurrences)
Last logged: 11:07:47 PM
* Platform esphome does not generate unique IDs. ID air-compressor-controlsensorair_tank_pressure already exists - ignoring sensor.air_tank_pressure
* Platform esphome does not generate unique IDs. ID air-compressor-controlsensorair_line_pressure already exists - ignoring sensor.air_line_pressure
I got it figured out. Somehow another ESPhome integration added my air compressor control ESP board to it’s integration. I have no idea how that happened, especially since the ESP integration that it was added to is for an ESP board that I’m not currently using. Very odd.
I removed the air compressor ESP integration and the integration that had falsely adopted the air compressor ESP board, did a restart, then added the air compressor board back on.
Sorry to revive this thread, but I found this because I was having the same behavior but it ended up being a difference root cause:
I had an IP conflict on my network, so the device would work fine when the other device wasn’t connected (sometimes for hours at a time) but fail to connect when the IP was taken.
Solution: narrow my DHCP server’s range of assignable IPs to not overlap with the static IP that I had given the ESPHome. I actually ended up putting my ESPHome devices on a separate subnet also, but that was after I resolved this issue.