I’m wondering if there’s been any thought about adding some sort of alias or pointer mechanic to HA, allowing aliases to be associated with entity names and used in the place of said entity name (not the same thing as user-friendly names). To use a real example of what I mean:
I had a ZWave smart plug that controlled a humidifier. The entity name was something like switch.aeotec_zw096_smart_switch_6_switch_3
. I had an automation written to turn it on and off, set up several customization entries, passed it to HomeKit, assigned it to a specific Lovelace card, etc.
Then I decided to switch to a sonoff/Tasmota smart plug. Which means I had to find every place that listed switch.aeotec_zw096_smart_switch_6_switch_3
and change it to switch.sonoffs31_2
. Sure, I could do a global search-and-replace, but that doesn’t help with Lovelace (if it’s managed through the editor) or Homekit.
What I’d like is for there to be a way to define something like switch.alias_humidifier1
, which can then be set to point to an actual entity. Automations, front-end stuff, etc. would all be passed the aliased name, not the actual entity name. That way, if I change the hardware, I just need to reassign the pointer, all else remains the same.
If anyone’s used the pfSense software router, it uses a very similar mechanic where you can define aliases for IPs and ports (or port groups). That way, if you have port forwarding or firewall rules set up, and need to point them to a different machine, you just change the alias definitions, without needing to actually touch the rules.