cgarwood / homeassistant-zwave_mqtt

Limited Pre-Release of the new OZW1.6 Z-Wave component. Currently has limited platform support. Check the README for more details.
72 stars 8 forks source link

integration reloading causes errors in the logs #99

Closed marcelveldt closed 4 years ago

marcelveldt commented 4 years ago

If the integration is reloaded, the log is filled with errors about non-unique id's being generated. Looking into this step-by-step it seems that somehow entities are not cleaned up and stay lingering around, despite the fact that they do get a request for removal, as I've confirmed by adding some logging to the async_will_remove_from_hass callback.

The old entities are still present in the UI, although they are not responding anymore. Try to control a light for example will issue a warning in the log: Unable to find referenced entities light.fibaro_dimmer_2_instance_1_level

This needs fixing because it will confuse users.

Usecases: 1) User unloads the integration and adds it back 2) A user enables a disabled entity (core reloads the integration for that)

Schermafbeelding 2020-04-23 om 00 16 01
marcelveldt commented 4 years ago
Schermafbeelding 2020-04-23 om 00 26 41
marcelveldt commented 4 years ago

btw: offcourse a restart of hass fixes the problem