Entity name not changed when device name changed

Hi all,

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“




At least you see that both overview show the same name for this entity (different to the other entity above).

That is all totally random and confusing.

As you see in the screenshots that I cannot see the renamed name but the original ones in the temperate chart which makes it hard to read :grinning:.

I already searched the forum and found similar issues but the solution was to switch to the developer mode which I already did.

Thanks for your support.

I deleted one device integrated it again and renamed it.
Now it’s becoming even more strange: some but not all entities were renamed…

And then… when I close the device overview and open it again the entity names change! Whats that?

Last but not least: the entity name which is seen in the Temperature chart is different to the entity name above :

Im lost…

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.


Since today I have a zigbee stick and the same problem I think.
Don’t know 100% but in zwave integration it’s not so

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.

Update:
This is seems to be a “feature” https://github.com/home-assistant/core/issues/35336

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!

3 Likes

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.

1 Like

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.

Thanks @contact411 ! You’re a savior.

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.