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


#101

Thanks for your response @troy.
As for changing the “Name” in the GUI, shouldn’t you be able to change the “Name” without having to change the entity name? The built in check should allow you to change the name without having to change the entity too I would think.

As for shutting down HA and z-wave network while making changes, I’ll try to practice the safer method as well. I did try to update the zwcfg*.xml file with a new name and then allow HA to fix the core.entity files but that didn’t work for me. Maybe it’s because i made the changes while it was running (I did restart the whole Pi after the changes though).

but yeah, I’m having a lot of issues with changing entities and names which I thought would be pretty easy. Thanks again! here’s hoping they fix this soon.


#102

Have you noticed how long ago this thread was started?

If they haven’t fixed it by now I wouldn’t hold my breath waiting for a fix.


#103

Well … the thread was started a long time ago but things worked completely different back then (you had to use ozwcp - which might have been a little bit complicated and was outside HA). Then the zwave stuff was rewritten and integrated into HA and that’s when the chaos started IMHO.
The zwave integration as it is today really leaves some room for improvement …


#104

I don’t think you understand the timeline of Z wave integration into HA.

I started using HA in august of 2017. At that time all of the OZWCP functionality had been fully integrated into the z wave control panel of HA (mostly) just as it is now. Over that year from the time I started using HA till the time this thread was started (1 year later) the changes that had been made since then made it more “chaotic”.

After the initial integration, it worked perfectly fine. If you added a new node all you needed to do was go to the Z wave control panel (in HA) and rename the node. After you restarted HA the changes would be reflected in the entities created by that node. Done!

Then the concept of the original “entity_registry” was introduced. That’s when things really started getting overly complicated for the average Z wave HA user.

But it was still workable, tho less convenient, because you could still just rename the node in HA thru the Z wave control panel (in a similar fashion to as it is now - not outside of HA), delete the entity_registry.yaml file, restart HA, a new entity_registry.yaml file would be regenerated from the z wave controller with the new node name included and the changes would be implemented across all entities associated with the renamed z wave device all at one time. There was no need AT ALL to rename, one by one, each individual entity created by the device

Then when the decision was made to completely REMOVE functions from that control panel (namely and most fundamentally critical, the ability to rename nodes) things are where they stand right now.

This whole thread (and many others) has been about ways of coming up with workarounds to a situation that has been imposed on the users by the HA developers themselves.

And since this was intentionally rewritten this way and it’s been going on for so long with NO ONE who has any authority on the subject coming on here (I don’t know if you noticed but this is just one of MANY threads on this topic) and addressing any concerns or explaining why it has to be this way or giving any road map for making it better than it is right now I don’t see any reason to believe there is any interest in “fixing” things.


#105

Your concerns are valid, it certainly seemed easier. But you have to realize that home assistant is in a transition period. The devs are working towards a goal and that goal is to remove naming devices from components and build it in the UI in one place for all components. We are currently in an interim period where we only have half of the pieces to the puzzle. The only remaining piece that is missing is the ability to remove things from the existing entity_registry. So what’s needed for that? A UI that lists all named entities with a x next to each entity_id. I’m sure we’ll see something to that affect in the upcoming year.


#106

Kind of…

Another thing that needs to be done is the ability to rename the base “zwave.xxx” entity (which is created by every z wave device no matter what the functionality is) and have that base entity name propagate down to all of the children entities - “sensor.xxx_alarm”, “sensor.xxx_temperature”, “switch.xxx”, etc.

If that could be done then it would at least get us closer to a similar functionality that we had prior to all of the changes in the last year.

As I’ve noted before there are some devices that add up to 13 entities when the device is added to the network. It’s asinine to require us to rename every entity manually and individually.

And with all of the threads on this you would still think that at least one of the devs might have found some time to come around and say anything (at all) about what the end goal was and the steps that were required to get there and maybe some sort of timeline.

I don’t know if you’ve noticed or not (:wink:) but Z Wave (and Zigbee :roll_eyes:) seems to be one of the “core components” in any viable, successful home automation system. So you would think that there would have been a higher priority in allocating resources to getting this worked out over MANY of the other countless minor components that have been added over the last year.


#107

Thanks for sharing this! been banging my head against the brick wall for days. Only just starting out with Home Assistant, steep learning curve…


#108

Ah yes, that is something that needs to happen. I’m not sure if the devs are aware of that issue. I like many of them no longer have to rename devices. I also tend to ignore the devices I don’t use.


#109

@balloob - calling you out directly for this thread. there’s a great deal of frustration over the new requirement to individually rename every single entity created by a zwave node instead of the way it was previously where a bulk change affected everything. we understand that you’re trying to make things easier for GUI-only users, but if you read this thread, you’ll see that everyone is going around your intent and editing files manually. everyone is frustrated at the time lost to manual editing, and despite spending an hour this morning trying every possible way to rename a node, i was still left with an entity called switch.aeotec_dsc26103_micro_switch_2nd_edition in my config. I have a dozen of these, and they’ll come in with the same name, followed by _2, _3, and so on. i can change the friendly_name, but from what i can tell, this name is anything but friendly. it’s useless. i can’t trigger an automation to the friendly_name, and it’s wholly inappropriate to expect us to remember which switch is #2 and which is #10. allow us to name them how we want, so that we can interact with switch.bedroom_light instead.

this thread is a strong indicator that the users of your software want something different. you know you’ve gone down the wrong path when people start saying that HA has the same problems that caused them to leave OpenHAB.


#110

Maybe I’m confused, but you can name them how you want in the GUI. You just can’t bulk name them how you want.

In your case, go to the states menu. Type in the filter entities box: aeotec_dsc26103_micro_switch_2nd_edition.

Then click each and rename.

image


#111

As previously stated, renaming the “zwave.XXXX” should auto rename all child entities automatically based of the parent entity which currently isn’t the case.

Like in your example if I renamed “zwave.laundry” to “zwave.bathroom”, “switch.laundry” should rename automatically to “switch.bathroom”, less clicking less typing.

It would save tons of time due to some nodes having multiple child entities.

As a side note, I’d like it to issue the command to rename the node so the device itself saves the name to it’s EEPROM as well, but that’s just me.


#112

Yes I know, I’m specifically replying to this guys statements where he can’t rename the entity_id. I just don’t think he knows how to.

This is exactly the point of the pictures I posted. You can rename everythign without even touching the files, along with the zwave node.

I understand that the software is lacking with ‘renaming entities under zwave nodes’. I believe hope that this functionality will return in time.


#113

Well well well. I didn’t realize that Entity ID was also an editable field. Thanks for the info. The rest of my post still stands. Having to do this over and over for every single entity is abominable UX.


#114

I agree. This a huge piece and IMHO should have been included from the beginning.

Exactly why I just name each node in the zwcfg*.xml. one name – one time – one place. I know it’s wrong… but it’s quick and I’m lazy. Too much renaming the same thing over and over using the GUI. And my OCD just can’t let it go. I try to use the GUI first but this case it’s just too much.


#115

I’d like to add that even though this is true, it still kind of misses the point of this thread imo. It’s not just about the ease of propagating the renaming. For lack of a better terminology on my side, the zwave entities and the entities as they are represented in home assistant can easily get out of sync. For instance, disabling certain entities in zwave will keep these entities in home assistant, but now they will be ‘dead’, without any way to edit them. Imo manually deleting them through the ui would just be a band-aid.

I just want to make sure that if/when a fix comes along it will be comprehensive.


#116

Dead nodes is completely unrelated to the thread and the process to remove dead nodes has not changed since the inception of the Zwave Configuration UI. To remove dead nodes, you need to remove them from open zwave after exclusion through the zwave ui. In fact, if you remove entities from the entity registry, it will not remove the dead node from open zwave and the entity will appear back in home assistant. All this is covered in the zwave documention on dead nodes:


#117

This is exactly my point, because this is an assumption and I’m afraid it is false. If you remove a node using open-zwave (dead or not) the entity will not be removed in HASS (at least it wasn’t for me, see also earlier in this thread). At the moment you are required to also remove them by hand in the entity and device registry after removing the node.

The change in renaming was done to centralise everything I assume and to get rid of ambiguity, which is a fine idea. But this assumes that the Zwave configuration and the rest is properly integrated in HASS, which it clearly isn’t.

I’d also like to add to that that none of this is obvious imo. Even if there’s a way to ‘properly’ handle the issues that crop up in this thread; The UI at this point is confusing (to me at least, it’s only starting to make sense now really) and I think it would be a mistake to double down on it. The whole thing needs a good rethink, not ‘just’ a fix for the renaming.
It may be a bit haughty to use as a benchmark, but I believe that if it takes this long for me (someone familiar with programming) to figure out, most people will give up long before that and look elsewhere.


#118

I feel like a broken record. We are in a transition period. Hell, everything that we are talking about was added in the past year. Changes will come. Assuming that these won’t be linked together in the future is just plane wrong.

I’m sorry that you had a bad time removing a dead node. The proper process (Even before the entity registry) for removing a dead node was the following:

  1. Exclude node.
  2. Remove dead node.
  3. Remove all references to node in HA configuration. (Optional, but will remove errors in logs)
  4. Purge your database so that the HA entity no longer appears in the UI history page. (Optional, will go away on it’s own after normal purge cycle).

When the entity registry was added in June/July of 2018, the process changed to:

  1. Exclude node.
  2. Remove dead node.
  3. Remove item from entity registry.
  4. Remove all references to node in HA configuration. (Optional, but will remove errors in logs)
  5. Purge your database so that the HA entity no longer appears in the UI history page. (Optional, will go away on it’s own after normal purge cycle).

This process is still the same today.

This will not always be the process as the entity_registry is somewhat new, and renaming devices in the entity registry was added sometime in the last 2-3 months.


Now to address your concerns. I believe (I do not know for sure), that when entity removal will be added to the UI, the process will be:

  1. Exclude node.
  2. Remove item from entity registry via (currently non-existing) remove item in the COG configuration. (which in turn will remove the node if it’s dead).
  3. Remove all references to node in HA configuration. (Optional, but will remove errors in logs)

#119

Thanks for the update, @petro. I know I am sometimes bad at finding and reading instructions, but even with your recent post I can’t seem to succeed in fully removing old z-wave entities.

First of all, I don’t see a button to “Remove dead node” in the zwave config gui. If I am not mistaken, there used to be such a button in hass.io. Where am I supposed to perform the dead node removal if not in the config?

2nd: I still don’t know if I need to remove my zwave entities from both core.device_registry AND core.entity_registry and if I need to stop HA while doing so.

I have tried to clear everything I can including doing a factory reset of my Aeon Z-stick, but I can’t get rid of the nodes in my old zwave network. Putting back a fully restored z-stick only shows a handful of the 30+ zwave nodes I have, so it feels like I am stuck with my old zwave network without a tool to remove the nodes.

I apologize again if I am not reading the documentation well enough, but I am just getting more and more confused the more I read in this and other threads on the topic. I think this is genuinely difficult. The only reason I want to start over fresh with my zwave network is that hass.io suddenly stopped being aware of most of my nodes.


#120

It looks like work has been done here. I believe it’s just called ‘remove node’ and you have to select the dead node via the dropdown.

  1. I’m not sure about the core.device_registry. I’d check it after you remove the dead node.
  2. Yes, HA needs to be off when editing any of the hidden files inside the hidden folder .storage.

I’m not sure if the documentation is up to date. These changes move so fast it’s hard to keep up.

No, it’s not easy. I’ve struggled in the past myself.

I’d look at your zwave map. It sounds like you have one dead node that is the bridge to all other nodes. Something like this is hard to figure out but hassio just listens to openzwave. If the communication is not present during startup, then you wont see the devices in HA. Zwave is a mesh network. Logically think about all the nodes in your house and see which one would bridge to the others. For future reference, it’s always good to get a zwave map so that you know what device bridges to the rest. I believe people have solutions on the forums for this.