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

After adding node, Device and Entities list are confused until restart #68

Closed kpine closed 4 years ago

kpine commented 4 years ago

I added a new node using the zwave_mqtt.add_node service. The node and its entities are detected immediately, but almost none of them are associated with the "ZWave over MQTT" integration, and instead the "sensor" integration. They are marked as read-only because they do not have a unique ID.

image image

image

But if I click on an entity and go to settings, it seems to realize that it is part of the device and integration, so something is confused.

image

I then checked the device entity registry files and they seem to be correct, each entity has a unique ID and is associated with the device. So, I'm not sure if this is an integration bug or HA bug. After restarting HA, everything looks normal, but I would hope a restart is unnecessary. I've attached files from before the restart.

files.zip

marcelveldt commented 4 years ago

True, this still needs fixing. Thanks for the reminder ;-)

marcelveldt commented 4 years ago

Issue reproduced step by step

When adding a node, it's values are available before OZW downloads the detailed info for the device. So when an entity is added to the hass entity/device registry, the device and model properties are not yet available. Those details do get filled after some time (few seconds till few minutes) and the entities change their default name accordingly but the device registry does not refresh/update.

We have to somehow "kick" the device registry to update the device details.

marcelveldt commented 4 years ago

This one is fixed once #94 is merged.