Assuming there are no issues, I’m thinking this would be a lifesaver if devices ever die or are replaced because I’m only updating the entity in one location.
I would really appreciate some feedback on this solution before I move forward and go crazy with it. I haven’t configured anything besides initial groups so I’m not sure if these references would work in automations or other configurations.
can’t you use the entity registry to do what you want? I thought that was the point of it. (I don’t have any devices that can use the entity registry, so I don’t really know)
I renamed light.level_24 to a test name, light.zSampleName, and was able to reference it with the test name in my groupings. I then swapped up the unique_id in light.zSampleName with a different device and restarted and the reference was updated as expected.
I’m glad I asked the question before going with my more clunky solution - apparently this is a brand new feature in HA.
Tried it and it seems to be working correctly. For me it is a GREAT improvement, every time i had to make a script, automation, scene I had a hard time remembering what is sonoff_1 or sonoff4_2…
The name change only takes effect on a restart and you have to list everything in the entity registry that you upload. For example, when I added in a new Sonos speaker, HA updated my entity_registry.yaml file but the names didn’t persist. I had to update a local copy with the new Sonos speaker information and reupload - everything worked fine after that.
I’m also still running an older version of HA. 63.3, I plan to update to 65.x shorly.