What is the preferred way to rename z-wave entities?


#1

Hello,
I’m currently migrating my installation from Domoticz to Home Assistant.
There seem to be different ways to assign friendly names to my entities.
I started already renaming the nodes in the entity_registry.yaml.
Now I’m unsure how to go ahead with the devices. I have 59 z-wave nodes, so I want to do it right first time.
What is the preferred way to assign friendly names?
Shall I do it in the configuration.yaml, registry.yaml or does the UI offer an option?

Thanks


Renaming Z-Wave
#2

I can’t say it’s the preferred way but the way I do it:

  1. I go to the z wave configuration panel under the configuration menu on the left and rename the node there.

  2. I rename the existing entity_registry.yaml file to something else (typically…_old)

  3. restart HA. It will then recreate the entity_registry file from the z wave xml file that ios generated when you rename the nodes. that way All of the entities associated with the node get the same base name with just the suffixes added (_switch, _level, etc.).

  4. then I rename the stuff I still care about in the customize section of the config. A lot of the time there are many entities created by the device that I’ll never use so i completely disregard those. And most of the time I’ll just completely hide them.


#3

From 0.75, use the UI. That allows you to change the entity ID live, without restarting.

The options in the Z-Wave menu are going to be removed shortly. You can still use them, but you’ll have to restart. You can edit entity_registry.yaml, but you have to do so with Home Assistant shut down.


#4

Which options are going to be removed?


#5

Rename Node and anything else to do with renaming - as all naming can be done through the UI already, and it’s better to be consistent.


#6

Hi, thanks a lot for your answers.

is this the right dialog?
2018-08-16%2021_25_21-Home%20Assistant

Thanks


#7

That’s it :wink:


#8

That’s easier than expected, thanks a lot!


#9

Hi Tinkerer that explains why I couldn’t find Rename Node anymore. I wanted to bring to your attention that renaming the entity does not change the node name. I don’t know if this is a bug or what, but without Rename Node I had to manually call the service.


#10

Changing just the name will only change the friendly (display) name. You have to change the second line - the entity_id - to change the entity ID.

If you meant something else, could you provide more details please.


#11

Yeah I meant the zwave node name not the entity (the name that appears when you view the node information). For all intents and purposes it doesn’t do anything. All automations, groups, etc use entity ID, but it irked me that I was able to change one of my enerwave smart meter receptacles pre-change to “Dryer Smart Meter Receptacle” but my new one for the washer was stuck at Enerwave smart meter duplex… Even though the entity ID was changed to zwave.washer_smart_meter_receptacle.

Hope that clears up when I mean. I can grab a screenshot if you’d like me to clarify further.


#12

Those two things are totally unrelated - the friendly name is simply based off the entity ID by default, but won’t change when you change the entity ID. Why would it? If you wanted the name to change you’d have done so :wink:


#13

I really don’t think I like that its being done away with. I like the ability to change things on a node basis instead if being forced to edit every entity_I’d created by the device individually. And I like that I can keep the information in the XML file useful and relevant. Without being able to interact with the node directly I can’t easily do that. I don’t understand removing functionality that already exists for just the sake of removing it.


#14

The only thing that’s changing is that the extra UI options are going away, because they’re duplicating what’s provided by the standard entity registry view.


#15

If I update the entity_I’d in the registry editor will that change all of the entities base names created by the z wave device (sometimes up to 5 or more)? and will it update the ozwcfg XML file for the node name?

If so then cool. If not then not so much…


#16

No - and it doesn’t with Rename Node currently - because that way leads madness. What if you’ve already renamed them? It also won’t updated the zwcfg*.xml file, because the name in there is no longer required by Home Assistant.

If you want to force a rename of the other entities, carry on the with the traditional approach of shutting down HA, deleting the entries from entity_registry.yaml and starting HA. Of course, you’ll be quicker to rename them all with the UI than waiting for HA to stop and start :wink:


#17

When did all of that change?

I just added a z wave outlet a couple of weeks ago and the ozwcfg file has the updated node name that I chose after it originally got added with a generic node name.

Here is the info on the last device I added from the xml file:

<Node id="29" name="Outside Camera Outlet 1" location="" basic="4" generic="16" specific="1" roletype="5" devicetype="1792" nodetype="0" type="Binary Power Switch" listening="true" frequentListening="false" beaming="true" routing="true" max_baud_rate="40000" version="4" secured="true" query_stage="Complete">
		<Manufacturer id="39" name="Honeywell">
			<Product type="4952" id="3133" name="Unknown: type=4952, id=3133" />
		</Manufacturer>
		<CommandClasses>

It originally had the name in the entity_registry of “…honeywell_unknown_type4952_id3133_…”. Now it has the node name “…outside_camera_outlet_1_…”. The file is dated 8/20/2018 so the ozwcfg file is being updated by something. I’m assuming that something is HA.

If I delete the ozwcfg file I thought it would be regenerated from the info on the z stick which will contain the node name info that I gave it when I ran the “rename node” command. I thought that was right because I’m pretty sure I remember having to do that once after restoring a backup to my z stick.

Are you saying that the ozwcfg.xml file is also being deprecated?

If the “rename node” functionality is being removed then it negates the option of updating the node name so there will be no point in deleting the registry file.

As far as HA stopping and restarting I don’t have an issue with that. It takes around 30 seconds for a stop & restart. And besides that it would only impact me every month or two when I would need to add a new z wave device. So it’s not really a big deal.

Obviously I’ll just have to start doing it however the developers are requiring us to do it. I just don’t have to necessarily like it. :wink:


#18

0.76 is when it started to change.

The files used by OZW aren’t being deprecated. However Home Assistant is moving to keeping all the entity IDs in the same place, and name things through the same UI. It’s all about consistency.


#19

I’m also in the progress of migrating from another home automation solution to Home Assistant and made the mistake of upgrading to 0.76. The removal of the “rename node” button was undocumented, or maybe I didn’t look at the right place… I’m learning HA.

One single zwave node can spawn several entities, e.g. temperature, humidity, etc… for a sensor. All these entities are created using the “node name”.

In 0.75, I was using the rename node button, deleting entries in the entity_registry.yaml, restart HA and everything was recreated with the right name (i.e. based on the node name).

In 0.76, using the UI as described previously doesn’t change the “node_name” listed in the Z-wave control panel. That means that every sensor (temperature, humidity, etc…) have also to be changed manually. With some devices having more than 10 sensors, it’s a nightmare.

I understand the intent to have a single place to rename entities, but in the case of zwave it seems the decision to remove the “rename node” button was taken to rapidly.

“Rename Node” was doing more than renaming a node, it allowed to set the base name of all sensor entities associated to that node.

Am I missing something? Thanks for your help


#20

renaming using entity_registry or the rename feature in entity panel is equivalent, and actually pretty elegant. I would have set the key as “friendly_name” instead of “name” to avoid confusion, because it it the friendly name. The name is the root key of the node.