-
-
Notifications
You must be signed in to change notification settings - Fork 30k
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
Reboot buttons for Shelly devices is trying to use a unique_id that's already in use. #95560
Comments
Hey there @balloob, @bieniu, @thecode, @chemelli74, @bdraco, mind taking a look at this issue as it has been labeled with an integration ( Code owner commandsCode owners of
(message by CodeOwnersMention) shelly documentation |
I'm not able to reproduce the problem. Could you show us the reboot button entries from |
wahser_dryer entity registry:
paired config entry
C45BBE603D98_reboot has 2 matches entity_registry
paired config entry
2nd
matched entry
|
There are two entries in your registry for the reboot entity. You probably renamed the device (from |
I'll just edit my registry. No idea how this even happened. Haven't touched those entities in a year or so. |
There was a bug in the integration code, when the user renamed the device, new button entities were created and the "old" ones became unavailable. |
Oh, if that bug is fixed, I'll just delete the wrong config entry wheenver I get a chance |
Still doesn't make sense why I'm getting 2 errors when only 1 of them has a double entry, but maybe I did a bad job looking for it. |
I was thinking if we find a button entity that is already migrated we delete all entities that has |
I did this test today:
and the What am I missing? |
I don't think you are missing something. I think we can wait to see if other have this issue. Anyhow I was thinking maybe we can check if the device MAC (which we use as part of the unique ID) is not part of the entity and delete entities without MAC. This will ensure we clean-up old entities. WDYT? |
I will repeat my test with two devices Plus Plug S and Gas so there will be more buttons to migrate. Maybe with more entities there is some edge case. |
I was able to reproduce the error with Shelly Gas (4 button entities) and I will prepare the fix. |
I was just about to open an issue for this after updating to core 2023.7.0 I have indeed renamed my devices. Do I need to edit the .storage registry or will your PR fix this when it is released? |
Fix is a part of the HA 2023.7.0 release. Probably you need to remove unavailable button entities in the UI. Please do not edit the registry. You can share your registry here so that we can analyze it. |
Thank you. Deleting the unavailable buttons and restarting worked perfectly. |
The problem
Title explains it all. The integration is attempting to reuse a unique_id that's already taken by another entity it has created. The entity with the issue appears to be the reboot button for each device. I have 2 shelly devices, this error appears twice in my logs for each device.
What version of Home Assistant Core has the issue?
core-2023.7.0b0
What was the last working version of Home Assistant Core?
core-2023.6.3
What type of installation are you running?
Home Assistant Supervised
Integration causing the issue
shelly
Link to integration documentation on our website
https://www.home-assistant.io/integrations/shelly/
Diagnostics information
No response
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: