Zwave entity names changing on their own

Just got HA running recently and am trying to get my massive load of Z-wave switches and motion sensors setup. I’m having an issue where entities are changing their names after discovery.

For example, I added a Linear dimmer switch to the network (using the add_node call in HA developer tools), and it showed up in the entity list as light.__level_10.

OK, a little odd given that the first dimmer switch I had added was light.linear_wd500z1_wall_dimmer_switch_level_5, but whatever.

I proceeded to do all my configs – adding it groups, scenes, etc. I do this with several other devices as well. Then later I have to restart my server, and when it comes back up, every single device I had added that had initially showed in the format “light.__level_10” is now “light.linear_wd500z1_wall_dimmer_switch_level_10”.

So of course now nothing works and I have to go through and change all the entity IDs.

Does anyone have any insight on why this happens, or what I can do to get a reliable entity ID when I add my new devices without restarting the server after every single one?

This is how it has been working for me - the first time HA sees a new ZWave device, it doesn’t seem to get all the attributes including any names added by OpenZWave Control Panel. My workflow is as follows:

  1. Add the device (using the stick button, open ZWave CP, or the Add Device Service in HA)
  2. If adding by HA Service, restart HA and verify the new device is seen (it will have a generic name as you first saw)
  3. Restart HA again and check that the device is called something like “light.linear_wd500z1_wall_dimmer_switch_level_10” or similar (will replace the device type with your name if supplied)
  4. At this point the device name is stable and can be used in automation etc

So basically you need to rename the device and restart HA until it shows the device with that name.

1 Like

Interesting. Disappointing, but thanks for the confirmation of the behavior I’m seeing.

On a related note, the other weird thing I’m seeing is that sometimes my custom names in OZWCP are being picked up by HA, sometimes they’re not. Doesn’t matter how many restarts I do. So I’ve given up on giving devices “nice” entity names, and am going to have to deal with about 40 instances of things like light.linear_wd500z1_wall_dimmer_switch_level_10.

Are you copying the zwcfg file between OZWCP and HA? They are separate. I use a symbolic link to keep them in sync - took me a while to figure that out!

When you have it setup right you can get stable somewhat friendly names. The HA ZWave component munges several fields together to make the EntityID but does include the name you give it. My office light is called light.office_level_29 which is fairly friendly :wink: I actually named it Office in OZWCP. level is presaumably related to the class of the device, and 29 is it’s zwave node id.

2 Likes

Well…why didn’t I think of that?? One symlink later, now I have nice names for everything!

Thanks for the tip! :beers:

Great :slight_smile: I can’t take full credit - I found a similar hint elsewhere on this forum, but happy to pass it along.

Which file is the source, which the target file for symlink?
I see always the name “Aeotec Micro Switch (2nd Edition) Switch”.
When I go to Dev-Tools and take my entity “switch.aeotec_micro_switch_2nd_edition_switch_2”, I can set a new friedly name “Kitchen Light”. Everything look ok.
But the first time I change the state from off/on or on/off, the old name “Aeotec Micro Switch (2nd Edition) Switch” is showing again.
I tried also to customizing my device (https://home-assistant.io/getting-started/customizing-devices/).