-
Notifications
You must be signed in to change notification settings - Fork 590
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
Unable to delete a device #2578
Comments
This doesn't seem to be due to the integration, but something else that is going on in Home Assistant. There are no entities associated with this device according to the diagnostics, so I guess something has gone wrong earlier and now the HA registry is in an inconsistent state. But without knowing what went wrong, and capturing the log of that, I can't really see anything that can be done. |
What probably happened is that some previous delete attempt actually deleted all the entities, and now this error is happening. I'll investigate more. |
Oh, just realized that the entity got re-created on Home Assistant restart. I can now try to delete it again: chrome_Jc8GUqfcdN.mp4Worked! I guess indeed nothing can be done about this. I'll close, but if it ever happens again, I'll try to get logs since the beginning. |
@make-all, I was able to find the exact and reproduceable situation where this happens:
This error will happen. |
I was unable to reproduce the problem following the steps above. It looks like restarting HA works for getting out of this state, which seems to have some convoluted abnormal preconditions for getting into in the first place, so I will deprioritise this again now. |
@make-all, I was trying to reproduce it again with latest version and found a situation where I could not reproduce it. The situation was: if I unplug power from it but wait for it to become unavailable in Tuya Local naturally, then this issue does not happen. Thus, here is my reviewed procedure:
The device does not get deleted. Notes:
|
This may be complete science fiction, but I believe the problem is when the integration tries to control/connect to a device while it still thinks its online (when in fact it's offline). This renders the integration into a stuck state, where only restarting Home Assistant helps. And I believe the same root cause is one of the things affecting #1804. |
Description
I'm unable to delete a Tuya Local device:
chrome_xpjDAOtZGG.mp4
If the problem cannot be fixed, do you have any tip on how I can force-delete this device?
Steps to reproduce
N/A
Expected behaviour
Other devices I can delete just fine, I was expecting to be able to delete this one too.
Additional context
Debug logs:
Diagnostics:
config_entry-tuya_local-dce9241ea93d89d91b21320960ddae1e.json
Confirmation
I am sure this is a bug or improvement, that is well enough described that it can be implemented.
If this is for a specific device, the device config is mentioned above, or diagnostics are included.
Log messages or diagnostics relevant to the issue are included.
This is not requesting addition of a new device.
The text was updated successfully, but these errors were encountered: