I have a bunch of entities that are discovered, and get their name automatically. Most of these are just fine, but some, especially Z-Wave devices, have really bad names. Sure, they are unique. But they are really cumbersome to refer to elsewhere, in rules etc.
I was thinking about trying to implement some way to take control of their names. My naive initial response is to either add this as some kind of customization field, real_name or so, but I suspect at that point the entity is already created with a read-only name.
Another option would be to create shadow devices, like:
switches:
- platform: alias
bedroom: bedroom_switch_2_0
A third option would be to provide some kind of translation map, that component that provides discovered entities must look in and use as replacement if a match is found.
Which of these approaches seems most reasonable to pursue? Or is there some fourth, even better solution?
I’m not sure how you mean you are doing that in the customize section.
I’m not talking about the friendly_name, I’m talking about the entity name. The names are not “dynamic” in that they change from run to run of HA, but the names are generated by the platform (e.g. zwave), and they are, if not hideous, so at least hard to remember. For instance, “sensor.doorsensor_access_control_6_9”, which I’d rather name “sensor.doorsensor_ir” or so, so I can remember the name when writing rules using that sensor.
There is no such configuration. That’s why I was planning to write code to do this. I wanted input from other developers on how to best achieve this.