Closed AndreKR closed 1 year ago
I am guessing this issue should also be linked to zha integration and components for reference?
https://www.home-assistant.io/integrations/zha https://github.com/home-assistant/core/tree/dev/homeassistant/components/zha
This seems to depend on the particular Zigbee device by the way. I just connected a different model of temperature sensor and with that one the renaming works.
At first I thought this is a duplicate of home-assistant/core#35336, where as far as I understand the issue was that when you change the initial name without renaming entities, subsequent renames won't rename the entities anymore because the entity renaming is just a string replacement.
However, the issue can also happen even if the initial name was preserved. The first device I paired was created as "LUMI lumi.weather" and the entities were called "sensor.lumi_lumi_weather_temperature" and the renaming still doesn't work with this device.
I had the same thing just happen with a Tasmota device, so it might not actually depend on the device but might be a general and intermittent problem.
I am seeing this with ZHA and Aquara devices too. I am also seeing the same behavior with Z-wave JS and Kwikset door locks.
Possibly the same as home-assistant/core#77150
I am having the same issue but from what I've read this is a "feature". HA Devs, please fix this "feature"
I am having the same issue but from what I've read this is a "feature". HA Devs, please fix this "feature"
exactly @netzbus this is not a feature cause the UI is asking the user and is indicating Do you also want to rename the entity IDs of your entities?. When users click "rename" it does not work. So clearly a bug to me, its not a feature.
Yes, it is a bug. The feature renaming the entity IDs doesn't work on most of my ZigBee devices. The Tuya bulbs work, a Tuya switch doesn't. That is a very annoying bug. When a device fails, you could remove it, exchange it against a new one, rename that new one and as the entity IDs would be the same as that of the old one all automation and UIs will work without a problem. As long as that isn't possible all automation and all UIs need to be edited, what can be a pain in the ass.
Zigbee2MQTT gives the feature to rename the device and it won't be visible to HA with its real name. Unfortunately that is not a feature of ZHA. I tried to move to Zigbee2MQTT but than the Zigbee network is absolut unstable and unreliable. Devices keep getting offline. That doesn't happen to the same devices via ZHA.
Nevertheless it is not only happening to Zigbee devices. It is a problem for other devices too.
Renaming entities has several pros and is in my eyes a necessity for a good configuration. It is the same with variables in programming. Bad naming makes debugging of an automation, where you can't see the alias very hard.
Having the same issue here. Renaming Aqara devices does nothing to the Entitiy IDs. So having 29 devices and 159 entities, this manual work is going to be annoying and take some time. I'm not a developer but I don't see how hard it would be to capture the results after clicking 'RENAME' to trace where the issue is?
I wanted to migrate to skyconnect and zha today, and i encountered exactly this problem. i guess i have to wait until this bug is fixed, because i don't feel like renaming my 50 devices with about 400 entities manually. ;)
Moving this issue to the frontend, as this is not a backend feature, but a frontend one.
../Frenck
Having the same issue here. Renaming Aqara devices does nothing to the Entitiy IDs. So having 29 devices and 159 entities, this manual work is going to be annoying and take some time. I'm not a developer but I don't see how hard it would be to capture the results after clicking 'RENAME' to trace where the issue is?
I am rapidly expanding my ZigBee network and not being able to rename ZigBee devices is making management difficult.
I'm reluctant to build automations because they will all need to be updated when the EntityID is changed.
Having the same issue here. Renaming Aqara devices does nothing to the Entitiy IDs. So having 29 devices and 159 entities, this manual work is going to be annoying and take some time. I'm not a developer but I don't see how hard it would be to capture the results after clicking 'RENAME' to trace where the issue is?
I am rapidly expanding my ZigBee network and not being able to rename ZigBee devices is making management difficult.
I'm reluctant to build automations because they will all need to be updated when the EntityID is changed.
I have solved my problem by moving my ZigBee network from ZHA to ZigBee2MQTT. I needed to exchange my dongle to a ZBDongle-E to make it work. In ZigBee2MQTT you can rename the device and with that also change all IDs that correspond to that device. There it is no problem, but still this is a bug in HA even though the developers see that otherwise.
I have solved my problem by moving my ZigBee network from ZHA to ZigBee2MQTT.
That was my solution as well.
I'm reluctant to build automations because they will all need to be updated when the EntityID is changed.
Yes, and by the way, you should also avoid those device
type triggers like the plague, because they break with the usual "the entity ID is the rendezvous point" principle of Home Assistant. Use event
or mqtt
triggers instead.
Having the same issue here. Renaming Aqara devices does nothing to the Entitiy IDs. So having 29 devices and 159 entities, this manual work is going to be annoying and take some time. I'm not a developer but I don't see how hard it would be to capture the results after clicking 'RENAME' to trace where the issue is?
I am rapidly expanding my ZigBee network and not being able to rename ZigBee devices is making management difficult. I'm reluctant to build automations because they will all need to be updated when the EntityID is changed.
I have solved my problem by moving my ZigBee network from ZHA to ZigBee2MQTT. I needed to exchange my dongle to a ZBDongle-E to make it work. In ZigBee2MQTT you can rename the device and with that also change all IDs that correspond to that device. There it is no problem, but still this is a bug in HA even though the developers see that otherwise.
Actually I went the other direction because I wanted less points of failure (MQTT was unstable for a few months).
yes this issue is a massive blocker to scaling the use of ZHA, if you have many devices have to individually manage names of both the device, the entity and the entity id's is a pretty confusing activity and prone to error
This was reported in https://github.com/home-assistant/core/issues/77150 as well but its working as expected for me which lead here since this is a frontend issue as already discovered above.
It would be helpful to know what happens when you try to rename and it fails
Open the Dev Tools in your browser.
Switch to the network tab
shift + reload to make sure the websocket is there.
Do the rename.
You should see websocket messages calling config/entity_registry/update
Look for any errors in the response or errors in the log This is what the success case looks like
Send from frontend: (id 73)
Response from backend: (id 73)
@bdraco The websocket message list is empty before and after a page reload and after doing a rename.
All other tabs in this websocket view are also empty.
Check the latest websocket connection, there is another one right below it in your screenshot. Scroll to the bottom and go up until you find the latest websocket after reloading. Once you confirm you see the messages coming in, do the test
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.
I don't think the issue is resolved, but personally I'm not using ZHA any more. I have switched to zigbee2mqtt with MQTT discovery and it works flawlessly, including renaming of entities.
The issue still exists, nothing has changed. At the moment I have less problems with it as ZigBee is better than WLAN because ZigBee I can use without cloud without problems I don't rename devices that have that problem as I switched to ZigBee2MQTT as @AndreKR did. But I don't think that there will be any solution coming as the devs stated that this isn't an issue and so it doesn't need to be repaired.
For all devices with dots in the device name, the current code will not work, because of different behaviour of slugify between the backend and frontend. The dots are removed in the frontend and replaced in the backend. This causes the entity names not to be detected.
A workaround working right now is rename the device to a name with all dots replaced with spaces (it doesn't matter if you rename entities or not, because it won't do anything). Then rename the device name to the name you want and click rename entities. This will work if the device name doesn't contain any other edge-cases.
I created a pull-request to solve this.
Didn't mentioned that dot problem. None of my devices ever had dots in their names so, that seem to be a different more special problem when renaming?
In this thread there are many references to Aqara (LUMI) devices with dots in their names. These can be explained by the dot. If there are other cases, these should also be investigated.
@Loeffelmaster You mention Tuya devices that work (Bulb) and don't work (Switch). Could you give examples of the device and entity names of the devices that don't work?
@AndreKR You mention that this also happens with a Tasmota device. Could you give examples too?
Edit: I took a look at the code, all special characters except: [/_,:;- ]
are also affected by this. Commas enclosed by numbers are also affected. Certain language specific characters are also affected.
The Tuya power switches are all Zigbee Model: TS011F Zigbee Manufacturer: _TZ3000_gjnozsaz
@Loeffelmaster could you give an example of a device name and an entity id? And where does it not work, after pairing on the pairing screen or on the device page under "Edit Settings"? In one case it would be a problem with the zha integration frontend and in the other case a problem with home assistant core frontend.
@Caius-Bonus Not anymore, as I switched to ZigBee2MQTT and there I have no problems with the names as I can change them in Z2M and everything is renamed in HA accordingly so I don't need to use the renaming in HA anymore. Normally only the device was renamed when I used to function in HA, but all connected entities still had the old name and needed to be renamed manually.
Okay, that's fine. If you do get more information, it might be better to open a new issue with that information. Because this issue seems to be more about the LUMI device shown in the video, which seems unrelated to the TuYa Switch issue you describe.
So I've noticed a similar issue that the linked PR hasn't seem to have resolved. In my case, it's Meross MSS310 smart plug devices that will after accepting the prompt to rename entities do not do so.
@Caius-Bonus did you want me to provide the device and entity names for you to see if there's anything specific that stand out?
@nightah This issue is about the cause of it not working for LUMI devices, which was inconsistent slugify between backend and frontend. Let's first take a look at the device names and entity ids. If those are not consistently slugified between backend and frontend, it would fit this issue, otherwise it is a new issue.
Sure thing so an example for a device in question is as follows:
Device Name: Coffee Machine
Entities:
sensor.smart_plug_2303132058002451070248e1e9bdcec0_current
light.smart_plug_2303132058002451070248e1e9bdcec0_dnd
sensor.smart_plug_2303132058002451070248e1e9bdcec0_energy
sensor.smart_plug_2303132058002451070248e1e9bdcec0_energy_estimate
switch.smart_plug_2303132058002451070248e1e9bdcec0_outlet
sensor.smart_plug_2303132058002451070248e1e9bdcec0_power
sensor.smart_plug_2303132058002451070248e1e9bdcec0_sensor_protocol
sensor.smart_plug_2303132058002451070248e1e9bdcec0_signal_strength
sensor.smart_plug_2303132058002451070248e1e9bdcec0_voltage
Clearly, the device names are generated based on some criteria that aren't immediately discernable to me. However, when attempting to rename the device it asks if all associated entities should be renamed and clicking yes results in nothing but the device itself being renamed.
Thanks for the IDs. However, I need to know the device name and entity ids before renaming. Could you also supply the IEEE number of the device? Additionally, could you share the Model and Manufacturer listed in ZHA?
I do however think that this is indeed a different bug and should have its own issue.
Why is this issue marked as closed? It's still very much not fixed.
I just experienced it again today with the GE Appliance integration.
Here's a video showing it happening.
The original problem was resolved. If there is still an issue please open a new issue with reproduction steps.
The problem
When I rename a Zigbee device there is a dialog that asks me to if I want to change the entity IDs as well. If I say yes, the entity IDs are not changed.
Here is a screen recording:
https://user-images.githubusercontent.com/1188538/196586382-af10dcee-ebb9-48f6-ab20-c4f74e09fba4.mp4
What version of Home Assistant Core has the issue?
Home Assistant 2022.9.6 Frontend 20220907.2 - latest
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
It's a ZHA device, but renaming entities might be a core feature
Link to integration documentation on our website
No response
Diagnostics information
zha-e44f7ca51ed6bada21b888b7b0c6b6c0-LUMI lumi.weather-08fe1d02a16a83e6e6930e325da2cc71.json (1).txt
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
No response