When I integrate a new device via ZHA, I noticed that the entity name does not change properly when I change the device name. I use the developer mode and I confirmed that entities shall be renamed too when I updated the device name. The Names are unique and simple.
For the first aqara temperature sensor I changed the device name to „Spitzboden Thermo“ and the entity name just shows up like „Temperature“ in the device overview (I guess it should include the device name here). In the entity overview it is named „Spitzboden Thermo temperature“ (this is the way it should be…) first thing is, I don’t understand the mismatch of both overviews.
Then issue 2: the other aqara temperature devices are for example named like „Bad unten Thermometer“ but the entity does not change and stays the original e.g. “sensor.lumi_lumi_weather_184be207_temperature“
I found out that the entity can be renamed independently from the device name (didn’t know before). This helped me to get the proper entity name in the temperature chart.
However the behavior of the „device renaming“ which should automatically rename the entity equally is still strange to me. I think it’s a bug.
Automatic entity rename does not work for Lumi sensors.
For example entity sensor.lumi_lumi_weather_humidity_2 will stay by its name whatever you call the device. “Rename entry” feature is not working.
For other device types (e.g. Tuya plugs), device renaming works perfectly.
That’s strange, because there is not any special characters or so in lumi entities. Logs are empty.
I’m on HA 2022.8.3, devices and entities are published by ZHA integration.
Having the same issue here. Renaming Aqara Door sensor Device Name does nothing to the Entitiy IDs. So based on the Github issue, are we saying that when adding the device in ZHA, leave the default name and then the UI rename will update the Entity ID?
The issue is the device name is different than the entity names. Pretty sure mine got that was as I was changing the names of devices while adding them to Zigbee.
A workaround that worked for me. Rename the device to whatever the beginning of the entities are named and save it. Then change the name of the device one more time to whatever you’d like it to be and renaming all entities at the end.
Example: My first entity was sensor.lumi_lumi_sensor_ht_humidity so I renamed the device lumi_lumi_sensor_ht first, then renamed again to the name I wanted.
Hopefully this works for you as well, future reader!
I’ll add another update since this seems to be a high-ranked result on google. The issue seems to persist still and the workaround may or may not work, I had mixed results. I am on v2024.2.2.
There is this conversation on github marked as closed but I have the exact same behavior posted there so the issue is not resolved.
@contact411 's workaround worked for me for an Aqara (LUMI) door sensor a few weeks ago but does not seem to work for the weather sensor. Though I have 2 weather sensors of the same type while I only have 1 door sensor of this type so that might have had some effect, not sure.
I have also been having a lot of trouble entity renaming based on device name. I have seen it with about half my Wiz bulbs and now I see it with my ratgdo.
Renaming the device back to what the first part of entity name would imply and then to the new desired name, seems to have resolved the mismatch. It’s worth nothing that I may have taken extra precautions, like rename back to entity name, reconfiguring the Zigbee device, rebooting, and then renaming.
Could it be something to do with having some entities disabled when you first rename stops those entities being renamed? If so a solution could be to enable all entities under a device before renaming
Because the entity names can be renamed independently of the device name, if you rename the device, even if it offers to rename the entities, if won’t rename them if they don’t share the base part of the name. The post above provides details on how to work around this, and I’ve done it many times and can confirm it works.
Yeah after posting I went and checked for myself, using a new device that I was pairing. Many of the disabled entities did get renamed. The ones that didn’t were ones HA itself decided to give different names to (based on node number rather than device name) so they never matched right from the outset.