-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Entity IDs are not always renamed when renaming a device #15757
Comments
I am guessing this issue should also be linked to zha integration and components for reference? https://www.home-assistant.io/integrations/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". |
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. 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 |
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. |
That was my solution as well.
Yes, and by the way, you should also avoid those |
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 home-assistant/core#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. ![]() Look for any errors in the response or errors in the log |
@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. |
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. |
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: |
The Tuya power switches are all |
@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. |
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. @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: Entities:
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:
2022-10-19-04-52-15-chrome.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
The text was updated successfully, but these errors were encountered: