pawkakol1 / worlds-air-quality-index

HACS World's Air Quality Index integration from waqi.info
43 stars 12 forks source link

Integration creating duplicate entities #54

Open ejpenney opened 9 months ago

ejpenney commented 9 months ago

I have no idea how to reproduce this, but every time I reboot Home Assistant this integration has doubled entities (from 9 to 18). Half of them are "Unavailable", the other half have "_2" on their entity IDs. If I reload the integration, sometimes they'll swap position, the originals will work and the _2's will be unavailable. I end up having to delete the integration and re-configure.

image

The only thing I could think that might be unique in my configuration is the Ozone and PM10 entities are unavailable on setup, therefore I mark them disabled. In my environment, unavailable means broken, and I have templates searching for this, as this has and will never work, disabled is more appropriate.

I don't specify a name, and am using °F... Debug logs attached (token and precise location redacted).

home-assistant_worlds_air_quality_index_2024-01-17T22-13-02.719Z_REDACTED.log

ejpenney commented 7 months ago

I'll note that I decided to pin my configuration to one station, and this issue seems to have gone away. Looks like it's picking different stations every time it reloads... There's definitely a bug here, but at least my issue is "worked around".