Z-Wave JS UI name / location not synchronized with HA device name / area

Z-Wave JS UI asks for a node name & location when interviewing. After inclusion, and adding the integration, those show up in HA as device name and area respectively.
But a few problems arise :

  1. subsequently editing the node name/location in Z-Wave JS UI no longer change the device name/area in HA
  2. conversely, changing the device name/area in HA does not change the node name/location in Z-Wave JS UI
    IOW, there seems to be 2 places for the same thing on any given device. Is this intentional behavior ? Is it something that could be fixed in Z-Wave JS UI / HA ?

AFAIK, That is by design.

For example, if there were automations / dashboards configured and the name was changed in zwavejsui, all this automations would break because the underlying entity_ids would change. That would be viewed as bad behavior and hence a reason for the current design choice.

2 Likes

Agreed, almost positive this is by design. And I would vote to keep the behavior for the reason noted.

PeteRage/NathanCu,
That makes sense if you embrace the other implementation or design limitations inherent to renaming devices and entities in HA.
IMO, this is a part that could stand to be improved, independently of Z-Wave js UI.
Things I’d like to be able to do with HA renaming :

  1. be able to rename devices and have all referring automations that refer to them automatically changed, rather than having to do it manually
  2. be able to rename device entities and have all referring automations that refer to them automatically changed, rather than having to do it manually
    IMO, it should work seamlessly this way. Computers are efficient at automating this sort of repetitive task. This is not something the user should be forced to do.

Similarly, I think having to change the device name and location in 2 places is manual work that is error-prone and sub-optimal for the user to do.

I think we have this already in some sense: you can change the text name (not the entity_id) without breaking anything. E.g., I have light.philip_ceiling_switch but I have given it the name “Philip Ceiling” and I can change that name without breaking anything. -David

dbs,
I don’t have Philips Hue I’m curious where in HA you can change the device text name without affecting your automations. For my TP-Link Wifi smartplugs and bulbs, the automations refer to the device name because I am using “device” action rather than, say, a “Switch: Turn on” action which can take either an area, device or entity. I’m guessing you are using Entity. Indeed, you can rename the device without renaming the entities, and your automations will continue to work in that case, as long as they don’t refer to the device name, like the automation below.

If I change the “Name” here it keeps working with my automations. I only have problems if I change the “Entity ID”. However, I haven’t used the UI to create automations, so I don’t know what it uses to identify them.

dbs,
Your screenshot shows your automation is using “Entity ID”, thus renaming the device name would not affect it.

Your Device automations are also using a “device ID”. Renaming the devices should have no impact on the automations. If you switch your action to YAML mode, you should see it using a device_id, which is a random number and persistent for that device.

I agree with @madbrain that device names should somehow be synched across sub-platforms. And the name should not affect automations as those are platform based (i.e. HA) which should know a unique device id that is persistent.

This isn’t difficult and is the norm in other Z-wave management platforms (even Smartthings gets this right).

Add to the deficiency that the group/location isn’t settable in HA, though it can be set in Z-Wave JS.

FInally, neither the HA assigned name nor the group/location can be displayed on the device list table nor on the HA dashboard. I have over 70 devices, with 15 of them named GE-Dimmer. Kind of useless for doing anything with that named object.

-Peter

2 Likes

This is technically possible, but not a priority for z-wave devs. Z-Wave JS UI is a third party application so this kind of use case isn’t really factored in.

And the name should not affect automations as those are platform based (i.e. HA) which should know a unique device id that is persistent.

Device name and entity friendly names do not affect automations.

Add to the deficiency that the group/location isn’t settable in HA, though it can be set in Z-Wave JS.

Can you clarify what you mean? You can edit a device’s location in HA. In HA they are called areas.

FInally, neither the HA assigned name nor the group/location can be displayed on the device list table nor on the HA dashboard. I have over 70 devices, with 15 of them named GE-Dimmer. Kind of useless for doing anything with that named object.

Also not sure what you mean here. The device list shows both the user configured device names as well as their area (location).

Great post, thank you. What is clear is that I need to do this work on HA. ZJS is just a conduit, which is OK. Can you clarify a few things before I post some screenshots:

  1. Where on the device edit panel can I set the area? I seem to only be able to set the name.
  2. On the HA devices list, how can I display the device node ID? That’s the only way I can figure out what it is.
  3. Where in HA can I turn on/off a light? It should be a simple switch I can toggle.

I’m already guessing that I can’t setup my Leviton 4-zone controllers in HA (or even ZJS for that matter). I’ll keep using Vizia-RF for this. It works well.

-Peter

On the device page there’s a pencil icon that lets you edit it. It brings up the dialog shown in my post above.

image

On the HA devices list, how can I display the device node ID? That’s the only way I can figure out what it is.

You can’t. The device list is generic for all integrations, but node ID is specific to Z-Wave. There is not a dedicated panel for Z-Wave, so you are left with having to have to navigate to each device invidiually to see the node ID. A bit tedious, but that’s how it is.

Where in HA can I turn on/off a light? It should be a simple switch I can toggle.

There are ton of places to do this. Use one of the many dashboard cards to display a light entity. Every Z-Wave device page has all of its entities as well.

Just to summarize, if you want to have synchronized names and locations in Z-Wave JS UI and HA, then the best approach at this time is to manage names and locations exclusively in Z-Wave JS UI (ZUI).

Include all new devices using ZUI, which let’s you preset the name and location before inclusion. When HA sees the device being added, it should use the already entered name and location when naming the device and entities. Do not include in HA, it currently has no way of presetting name and location.

For existing devices, you can change name and location in ZUI at any time, and if you reload the integration in HA or restart HA, the device name, device location, and entity friendly names will be updated to match ZUI. Entity IDs will not be changed though, by design.

On the other hand, any device/entity name changes in HA will override anything set in ZUI, so you will need to avoid changing names in HA. As already discussed, changes in HA are not synced back to ZUI, and changes made in locally in HA always override what is reported by a device.

1 Like

@freshcoast, this is the opposite of what I expected but can work for me. Setting name in ZUI is obvious, and you tell me it will propagate to HA on restart. I can live with that because the zwave ID is readily available on the ZUI page.

Are you saying if I assign a group in ZUI, restart the system, that device will end up in the correct AREA in HA? That’s not obvious because the HA area may not even exist. Are you sure this will work?

But to summarize, do all of the Zwave work (adding, naming, group name, etc.) in ZUI and use HA as a scene setup only.

-Peter

1 Like

On the other hand, any device/entity name changes in HA will override anything set in ZUI, so you will need to avoid changing names in HA

Unfortunately, that ship has sailed for me. I didn’t know that changing names in ZUI would be later reflected in HA if I restarted HA. So, I set names and areas for all my Z-Wave devices in HA. Are you saying there is no way to reset them to the default so that the ZUI settings take precedence ?
If so, I hope some improvement on the current situation is planned.

1 Like

Yes, it works fine. HA will create areas automatically.

If I delete the custom name in HA, then I see that it reverts to the driver provided name. Otherwise, HA is not going to override your custom names, that’s how it works. It’d be unexpected if it did.

With a caveat… I just tried it this. If the area is unset, HA will assign the area from Z-Wave JS when the integration is loaded. If you change it again in ZUI, it does not get updated in HA after integration reload. But if you clear the area assignment in HA and reload, then it will be set again according to ZUI. If that all makes sense. That’s my observation at least.

Thanks, I will give this a try.

I can confirm that this works with names. Thanks.