home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
72.81k stars 30.51k forks source link

ZHA not including unique info (like IEEE tail) in new entity names #81703

Closed sbrocket closed 1 year ago

sbrocket commented 1 year ago

The problem

I'm just starting out using ZHA along with some new Inovelli Blue Series VZM31-SN switches I recently received. These switches have a large number of configuration parameters and so create a large number of entities (~38) for each device. The entity names that are getting created by ZHA are less than useful, however, and right now I'm facing manually renaming 38 entities for every switch I install 😭.

Besides the fact that the UI does not seem to be offering any option to automatically rename entities when changing the device name, like I've seen it do with other integrations, the default entity names do not include any unique info at all (like the IEEE tail; I've seen it mentioned elsewhere that including this is/was ZHA's behavior but that is not happening) in them.

The default device names for each new switch are Inovelli VZM31-SN and entities are named like light.inovelli_vzm31_sn_light. The entities for the 2nd switch I installed simply got a _2 suffix added.

So two questions:

Screen Shot 2022-11-06 at 9 13 35 PM

What version of Home Assistant Core has the issue?

2022.10.5

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Container

Integration causing the issue

ZHA

Link to integration documentation on our website

https://www.home-assistant.io/integrations/zha/

Diagnostics information

config_entry-zha-9becc96ac18d2563440f703b3aefd491.json.txt

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

home-assistant[bot] commented 1 year ago

Hey there @dmulcahey, @adminiuga, @puddly, mind taking a look at this issue as it has been labeled with an integration (zha) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `zha` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Change the title of the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign zha` Removes the current integration label and assignees on the issue, add the integration domain after the command.

(message by CodeOwnersMention)


zha documentation zha source (message by IssueLinks)

sbrocket commented 1 year ago

Ah, here is also the diagnostics for one of the switches, which appears to include the device signature too.

zha-9becc96ac18d2563440f703b3aefd491-Inovelli VZM31-SN-03d3dc3ccbcefef0bc602d0fc4fd5cdc.json.txt

dmulcahey commented 1 year ago

Rename the device from the device page not the pairing screen and you can bill rename all entities. The rest is functioning as intended

sbrocket commented 1 year ago

Thank you for the reply. I was about to post a long reply saying that I did as you suggested and it did not prompt to update the entity IDs, but then did a bit more searching through the HA forums to confirm how the bulk entity ID rename is intended to work.

It turns out that the bulk entity ID rename prompt only appears if you have "Advanced Mode" enabled for your user in the UI. I'd seen that before but had never enabled it since it isn't clearly documented (from what I could find) what that setting does. Once I enabled it and renamed the device again, I got the prompt to automatically update entity IDs. 🎉

Hopefully mentioning this here (even though this is an oddity of the HA frontend, not ZHA) will help others who might run into the same behavior! Note that as dmulcahey@ noted above you do need to do the rename from the device page to get the entity ID rename prompt, not from the ZHA pairing page.