Entity_registry...Again!

Is there anybody…anywhere…that can explain how to use this awesome :roll_eyes: new function?

I mean, I just don’t get it.

I just installed a new z-wave water sensor. it pairs and the new node shows up in the zwave section. so far so good.

Now when I go to the entity_registry.yaml I have several new entities that show up. So far so good again.

But…

When I try to change the name: of (for example) the binary_sensor.sensor to water_sensor_main nothing changes.

binary_sensor.sensor:
  name: water_sensor_main
  platform: zwave
  unique_id: 20-72057594378452992

I’ve restarted HA and rebooted the Pi and still the sensor still shows as binary_sensor.sensor in the states page.

How exactly is one supposed to rename the entities?

before I just renamed the node in the zwave config section and gave it a friendly_name in the customize section. Will that still work?

and if I do it that way how does that interact with the entity_registry?

This is the first zwave device I’ve added since the new function was added and I must say I’m really confused and there isn’t any clear and concise documentation being offered up by the devs to straighten this mess out.

you need to leave the domain part and just change everything after the period. All lower case no spaces so change binary_sensor.sensor: to binary_sensor.water_sensor_main: then restart.

1 Like

Thanks

So the first line is the line to change to rename an entity?

Is the “name:” equal to the friendly name then?

I thought the first entity id line was the line automatically assigned and was supposed to persist after manually changing its name so that if you did change the name you wouldn’t have to go through your entire config and update everything to the new name.

and there are several other entities that get created by one device. it seems silly to have to manually change the name of all of them when it use to be that changing the node name in zwave would change all of them to the same name with the extra stuff appended (_alarm, _burglar, etc)

Yes, it’s the first line that you should change to change the entity’s id. And I believe name is the friendly name, but I don’t use that (I mean I leave it there, but with no value) because I change the friendly name in customize.yaml to be consistent with how it’s done for other entity types. And, BTW, you’re not alone. I was very confused when I first started using z-wave. And I see a lot of other posts where people are confused. It seems like this who infrastructure (for naming z-wave devices) is in flux. Hopefully the dust will settle soon.

Thanks for the response.

I realize I’m not the only one to have problems (hence the “…again!” in the title).

it would be nice to at least have some clear documentation for any new functionality instead of just a vague few sentences. that might go a long way to making things less confusing to users. Especially, with all of the OBVIOUS confusion over this topic. The devs HAVE TO see that this is causing issues unless they just don’t keep up with these forums at all. I really don’t understand why this hasn’t been addressed yet.

1 Like

This does not seem like a “vague few sentences” does it?

https://www.home-assistant.io/docs/configuration/entity-registry/

yes it is kind of vague.

it doesn’t really say where you need to rename things or how renaming things in different ways interact overall.

right now there are 3 places where you can rename (for example) a z wave device: the entity_registry, the zwave control panel UI and the customize section. each one has a different effect on the operation and/or display of the entities associated with the device.

taking my example:

when i added the device it added all entities to the entity_registry and added those same entities to the states page. they didn’t have anything at all (or very tenously) to do with the naming of the device in the OZW UI.

the entities that showed up in states were:

      - binary_sensor.sensor
      - sensor.alarm_type
      - sensor.alarm_level
      - sensor.aeotec_dsb45_water_sensor_sourcenodeid
      - sensor.aeotec_dsb45_water_sensor_flood
      - zwave._

in the zwave control panel the node name was aeotec DSB45 water sensor

in the z wave UI the entities associated with the node were:

binary_sensor.aeotec dsb45 water sensor
sensor.aeotec dsb45 water sensor alarm type
sensor.aeotec dsb45 water sensor alarm level
sensor.aeotec dsb45 water sensor sourcenodeid
sensor.aeotec dsb45 water sensor flood

on the frontend if they remained unmodified they displayed with the entity id’s assigned by the entity_registry.

if i changed the name: line in the entity_registry i couldn’t see where it made any difference (the displayed name didn’t change). the docs say that it’s supposed “The value of name will override the name of the entity as given by the integration.” From that one would think that something would be different.

if you change the name of the entity (first line) in the entity_registry, then the name of the entity changes in the states and therefore all places where the old entity_id was used will need to be manually changed. the name doesn’t persist anywhere. Not to mention that to change the names of all the entities associated with a device that creates multiple entities you now have to change all of them individually.

and the names automatically assigned aren’t descriptive in ANY WAY at all. the only way to know which entities are associated with which device is to add them one at a time and see which entities get added to the entity_registry, modify each of them individually (potentially 5 or 6 entity id’s for each device) then add them to your config where desired.

using the zwave control panel (which you can still do) it changes all entities to a related name so that it’s pretty obvious that they all belong to the same device.

Now if I change the node name in the zwave UI it will change the node name and all of the associated entities but it won’t touch the entity_registry. then you have to STILL manually change each individual entity in the entity_registry for the display and entity id names to change (or use the customize section, which I haven’t tried yet but I assume might still work OK).

And now after I have added my device, it doesn’t change any values on any entities on the frontend. The OZW log shows that it is receiving the state change from the device but the entities aren’t reflecting it. Now the question becomes, is it due to some quirky thing with the entity_registry and how it interacts with the naming of the nodes in the zwave UI or is it the device or is it OZW not working (all other devices work properly) for this one device? It definitely adds another layer of complexity when trying to troubleshoot something that doesn’t work quite like you expect.

And lastly I don’t think it’s just me that isn’t getting it. From the number of threads about the new function and other peoples comments to people who don’t even know that the function is causing their issue i’m pretty sure i’m not alone in the confusion.

i’m sure there are more items of confusion but you get the idea…

2 Likes

+1 for the documentation on this being confusing. After adding zwave device, I use OZWCP to rename the node, then delete the entity_registry file - seems to work somehow but I’d like to understand the correct / intended functionality.

I also agree the docs are confusing (wasted 30 minutes scratching my head trying to add stuff to my Z-Wave network for the first time since the entity registry was changed). So I did the right thing and submitted an update on github :slight_smile:

1 Like

I agree the docs for this are not clear, or should I say full. What they describe they describe well but it really doesn’t give (me at least) the full picture. But, and this is a common thread throughout the HA docs, they often leave me asking as many questions as they answer.

For example, I came to this post because my Sonos TTS has stopped working for no apparent reason (if anyone has any clues I’d be grateful!). I never have any cause to look at entity_registry but I knew Sonos appears there so I went to look and what do I find?

But first you need to know that yesterday in other threads I have been trying to get reliable rainfall information which lead me to trying a specific weather station in Weather Underground rather than my default one based on latitude and longitude. I got very confused because the new weather station sensors were all suffixed with _2 and I wasted a lot of time going over my code, reading the docs and in the end never got to the bottom of it. Until…

Back to the entity_registry and, oh look! For no apparent reason all the Weather Underground sensors for both my original weather station and the second one I tried yesterday are in there.

Why? And where in the docs does it say that that will happen? Not in the Weather underground component nor the entity_registry docs (which very clearly states “At the moment, only the following components are supported: Z-Wave, Hue, Nest, LIFX, Sonos, Apple TV”).

And this is why I and others are increasingly frustrated with HA. Don’t get me wrong, I think it is brilliant and the documentation is also very good as far as it goes. And I am not complaining.

I do though get irritated with some people’s defensiveness whenever anyone mentions deficiencies in the docs. Let’s all just agree they are not perfect and try to help make them better and support people who have problems because of it.

And @dshokouhi this is not aimed specifically at you, I just replied to your post because you provided the link to the docs.

1 Like

Can you either submit an update, or raise an issue about it being wrong please.

The docs have gaps, and things that are outdated, but it does need people to flag stuff up when it’s wrong or missing.

2 Likes

I’d love to but I don’t know how to use GitHub - it is on my to do list but unfortunately keeps getting pushed back - and I don’t know where or how to raise an issue.

Seriously, I don’t want to be difficult, I have had so much help from this community that I would love to be able to contribute even if it is only a small and slightly obscure update to the docs.

If you click Edit this page on Github you’ll be able to submit an update.

In a pinch, if you can’t do that, submit an issue with details of what’s wrong and what should be there. That may take days, weeks, or even months, to get picked up and done by somebody though.

I’m not sure I understand what knowing how to use GitHub has to do with anything.

Create an account.

Click on ‘Edit this page on GitHub’

Click on the edit button.

Make your changes.

name your change something like: Update main page to include new link

add a description.

‘propose file changes’

You don’t have to understand git or sync any repos or be able to upload to git or anything. It is all done in your browser.

1 Like

It has quite a lot actually. How was I supposed to know that it was that easy if I didn’t know?

Moving on, your explanation was impeccable and I have submitted a change. And what is more I may submit a few more in future now I know how to do it.

1 Like

By clicking on the ‘Edit this page in GitHub’, it would have taken you to the page. I thought it was pretty straight forward, but if you never clicked on it before, you would be in the dark.

I did click that but this ‘scared me off’.

In the end it was very straightforward.

1 Like

I don’t see any PR in the queue, open or closed, for the entity registry. Can you ping me the number and I’ll check up on it.

Hmmm… I didn’t know how to find the number. Maybe I didn’t complete the process?
I have done it again and after submitting the change I get a button to create a pull request.
image
Do I need to select that?

Sorry for my ignorance.

EDIT: is this the number? f0eb41a

Yes, select ‘Create Pull Request’

This will submit it to the team for review