Closed psfales closed 9 months ago
I can confirm this bug. Could this be happening because HA is creating the Hub (which connects to the WebSocket) and the stored entities simultaneously, and the websocket results in an on_message which reloads the integration and thus two integration loads are happening at the same time?
there is another bug due to this, if two status messages come in a short timespan, two reloads are running simultaneously. This seems to be a very fragile construct, is there a better way than reloading the whole integration?
I know that a lot of this integration is not optimal, and the reload is one of these things. If someone knows a better way of doing this, i would be happy to implement it.
If I understand it correctly, the way to go would be to use a DataUpdateCoordinator in combination with CoordinatorEntity based entities, which inherit the required update functionality from there.
Unfortunately I could not find an example for a push websocket based service yet, but the Frigate integration gets close: https://github.com/blakeblackshear/frigate-hass-integration/blob/master/custom_components/frigate/__init__.py
I think this bug should be fixed now
When starting HA, get a whole bunch of ERRORs like this. (Every sensor for every device)
2023-10-08 15:48:50.447 ERROR (MainThread) [homeassistant.components.sensor] Platform open_epaper_link does not generate unique IDs. ID 00000218D1E03B10_battery already exists - ignoring sensor.00000218d1e03b10_battery