I’m trying to get my head around how I satisfy my OCD within the constraints of Home Assistant and the halfway world it is possibly in between UI and configuration.yaml (?) right at the minute.
- I have several identical door/window sensors created as devices by Zigbee2Mqtt (and also Zwave2Mqtt). Each has sensor entities for various "…_electric_consumption_X’ where X is “a” (current), “v” (voltage), “kw” (power) and “kWh” (energy). Ideally, I’d like to name them all something like “Energy Usage [kWh]: Device Name” and “Power [kW]: Device Name”.
I can’t see that you can use customize_glob.yaml to achieve this. I know you can use a wildcard to identify all the “sensor.*_electric_consumption_kwh”, for example, but then it appears you’d have to set the friendly_name for each to something identical such as “Energy Usage”. You can’t use the wildcard somehow in the output? This works fine for a device card where the devices name is at the top, but if you use all these energy entities on the Energy Dashboard (again, for example) then you’ll have “n” ambiguously named sensors. Is there a way around this that isn’t manually entering each in the UI?
- The UI lets me edit entity_id so if I wanted to clean up the “electric_consumption_kwh” to something shorter and more elegant like “power_kwh” (and I’m sure someone once said “energy can’t be created or destroyed/consumed” anyway!) it appears I can… but whether I should is a different story.
How does renaming entities work with integrations such as Zigbee2Mqtt? Is there a primary key in this mystical registry somewhere that I’m not privy to that allows this, or will it break the matrix exercising this power? At times it won’t let me rename an entity because that ID already exists… but for the life of me I can’t find that entity in the UI so I feel like I’m missing part of the story. (In that actual instance I was removing an auto appended “_2” that has been added to avoid duplicate entities created by the integration, but I can’t see the original copy and think it may have been deleted. Geez it would be nice to clean this up and delete any orphans etc properly.)