Open kpine opened 4 years ago
Strange, this is exactly what was fixed. I'll take another look.
BTW: In the log snippet you've sent there are no errors.
You are 100% sure you tested this with version 0.0.13 ? This exact behaviour was fixed in 0.0.13... Just asking before I remove a node from my setup to re-add it again ;-)
Pretty sure, but I'll try again.
I can reproduce. I was definitely on 0.0.13, in fact I upgraded to 0.0.14 to reproduce again.
BTW: In the log snippet you've sent there are no errors.
I think you missed the part where the entity names have no device name prefix. It shouldn't be sensor.battery_level
, it should be something like sensor.ct32_thermostat_battery_level
or whatever.
I've attached the debug logs. Here's a screen shot of the entities, missing their device name prefix.
I stopped HA and checked the device registry file, the names look correct. After rebooting the device names are correct in the UI. The entities however were recorded with the bad names.
OK, this is strange because this is exactly what I fixed in a previous PR and tested myself. I will try this again to see what's going on. Just to be sure: You did refresh the browser ? It is true that the device name itself comes through much later in the interview process but that is exactly why we created the new update method in core hass device registry.
Yes, I did refresh. The bigger problem is the creation of the entities though, they are stored before the device name is seen apparently.
That's no issue at all as the name will get updated afterwards. Anyways I will take another look at it asap
I just published version .15 to HACS, please have a test with that. As we're already implementing the code into core Hass it would be great to get some feedback if this issue is resolved.
WARNING: version .15 contained a change to the internal id matching so it is normal that you need to rename your entities/devices again.
I tried again and can't really say this is fixed because after adding the node there is no new Device entry or entities at all, even after refreshing (F5) the web page. After adding the node I have node 13 in the MQTT topics, but nothing in HA. The .storage files have no entries. After restarting HA the device and entities appear and are named correctly. In the HA log you can see node 13 was detected in the Add, but no entities were registered. After the restart they are registered.
It's strange because before trying version .15 I removed the integration, stopped HA, upgrade to .15 and restarted, then re-added the integration and all the existing nodes were detected fine (AFAIK). Just to be sure, I repeated the process twice, with the same results. I am running the latest version of this component.
$ git log --oneline -n1
3f005ea (HEAD -> master, tag: v0.0.15, tag: untagged-def09014fcd2b429703a, origin/master, origin/HEAD) fix node update (#125)
Attached are the mqtt dump and HA logs.
I added a node and the Device entries looked peculiar. There were many errors in the log too. Unfortunately I didn't get the zwave_mqtt debug logs because I wiped my config and forgot to enable them. I can try again if needed.
After the restart it looks correct.
ozwd sent several messages during the AddNode, and the product information was blank, until it hit query stage complete. Is it possible that the device and entities were created before Complete was reached, and something was not updated? The fact that a restart fixed it was good (and maybe the device info was actually saved to the registry?), but it would be preferable to not require that. I believe the HA core z-wave integration waits until the product data is valid before making the node available.