Fix ZWave Device Renaming

The new entity registry replacement is a great step forward but seems to have made the renaming of Zwave devices incredibly cumbersome.

Before the change using configuration -> Z-Wave it was possible to rename a node within Z-Wave config and all of the underlying entities would inherit the new base name.

e.g. Aeotec ZW075 Smart Switch Gen5 -> Garage Smart Switch

There was then a somewhat cumbersome step to force HomeAssistant to use the renamed entity ids and forget the old ones - I used to delete the entity_registry.yaml and force HA to recreate it on startup.

With the new approach I have to rename every single entity in the configuration 1 by 1 to get the same result.

We need a better way to manage this in the newer versions.

100% agree with this. Plugged in 3 new smart plugs now I have to rename 24 individual components… super obnoxious. Added new 4 in 1 sensors, need to rename 24 individual components… So tired of renaming things, what a waste of time

I gotta say, even though it’s a bit of a pain, how often are you adding these things? With a little bit of work I could easiliy rename 8 entities in 5 minutes or less. Again, I totally get the annoyance, but really, how often are we all doing these things?? It it’s your business and you do it daily, I totally get it. For the average user, the GUI will be easier, for the more savy user, there are other ways to edit yaml, etc.

For me I am just moving into a new house. I’m adding many devices right now, and there is zero documentation on how to rename entities in mass other than the UI. This kind of stuff scares away new users…

I just finally squared away how to do it using the “core.entity_registry” and “core.device_registry” files in the storage folder and that has made it much easier. But I think the biggest problem is it used to be really easy: You renamed the Z-wave device and like magic all the other entities reflected it.

So here I am into my 6th rename for the night, which to accomplish in a reasonably easy fashion means I have to shut down HASS, open and edit two text files use SAMBA, keep a putty connection up to restart hass. Nothing user friendly about that. Oh and then I missed a single double quote and all my entities disappeared, talk about scary…

I definitely understand the change is frustrating to many users. All I’m saying is that I personally believe that changing names in the UI does not scare away users, but the opposite. Again, it depends on the level of users.

I have a few devices that have 7 or 8 entities, such as a lock, or an outlet that tracks usage. I feel confident that I could change the name, and give them friendly names if I chose (same place), quicker and safer than editing the core.entity and core.device registries. I’d say 3 or 4 minutes tops. Again, it’s definitely longer than the old way, but it’s by no means complicated.

Here is my UI Process.

  1. Get the Node ID.
  2. Bring up the device list in the browser and search the page for “id: 100” (in this example the Node ID is 100
  3. Change the name while to what I want, for example “lock.back_door_lock” then I copy “back_door_lock” into my buffer. Give the lock a friendly name if I chose to do so. and save.
  4. find the next entry for “id: 100”, edit it, replace the name as neeed. For example, I’d paste “back_door_lock” in the appropriate place for “sensor.schlage_lock_words_etc_alarm_level” to end up with “sensor.back_door_lock_alarm_level”, and give it a friendly name while I’m there if I so choose.
  5. Continue down the line with the remaining 5 or 6 entities. Also, It’s not common, but maybe I want some of the entities to be named something different, like just “sensor.ignore_back_door_lock_power”, something I dont use, but dont want to hide.

Anyway, again, 100% understand this takes longer than it did before, but it’s consistent with all/most types of entities now, so no different for zigbee, zwave, or other types of devices.

I have used your workflow and agree it pretty much makes sense. However my issue is that the rename even at the zwave.xxxx level does not rename the actual Z-Wave entity.

i.e. I have a Neol CoolCam PIR Sensor that I have renamed to zwave.study_pir

node_id: 24
node_name: Neo CoolCam Battery Powered PIR Sensor
manufacturer_name: Neo CoolCam
product_name: Battery Powered PIR Sensor

I want the node name to be study_pir - this is how the Z-wave config rename used to work

With the current setup if I add another “Neo CoolCam Battery Powered PIR Sensor” as node 25 I will end up with something like “Neo CoolCam Battery Powered PIR Sensor_1” and I then start to struggle knowing which is which when I look at Z-wave entities.

I want the best of both worlds - when I rename in HA UI (which I am happy to do) I need it to do the low level Z-Wave rename as well.

Adrian

Ahh, that makes sense. I dont use “node name” in any of my automations, I typically use friendly name, so I never even really noticed that. I can see how that would be annoying, and I see that you cannot change that via the UI at the moment.

its a bit OCD I know but I like things to be consistent.

1 Like

Check the release notes of 0.100!
Sounds like there are improvements for renaming. :partying_face:

I’ve just tried this out, but sadly it doesn’t seem to work yet. It offers teh renaming of entities, but it doens’t actually work. The device page does make it easier to change everything in one place though.

Ok, I take that back, it seems worse now, because for some reason changing the name in the device_registry and removing all refrences in the entity_registry doesn’t work anymore.

[edit] forgot I had to change the name in the zwcfg xml and remove it in the device_registry