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
Removing Devices/Scenes from Tuya/Smart Life app only removes entities and not devices #36876
Comments
This is strange because device should be automatically removed by PR #35106 |
This may have been a problem in 0.110 (I hadn't deleted any of my devices in 0.110) as before that Tuya was only configured via YAML and didn't have devices (only entities). |
I even tried deleting and recreated the Tuya integration (which removed the phantom devices) in case this was to do with my setup having been migrated from YAML, but I can still reproduce this. After adding and deleting a scene, I get this: I wonder if the earlier startup in 0.111 is somehow preventing the logic added in that PR from working as expected (e.g. cleanup trying to run before the device registry has loaded). |
May be another issue should be opened referencing the PR. I remember that when I implemented the Config Flow I initially put the piece of code requested to clean-up device registry and during PR revision was asked to me to remove this piece of code. I removed and tested and device was automatically deleted when no entity available, this was 0.110. |
I also tried removing a bulb, and that did the same (entities removed but device was still there). |
@ollo69 It seems that a later PR #35977 changed this, so that devices are not deleted if they are not referenced by an entity but are still referenced by a config entity (the fact that devices which didn't have any entities but did have a config entry were being removed was apparently a bug). This would mean that the devices would only be removed if the whole Tuya config entity is removed. That PR was included in 0.110.2. I don't know if this means that the logic to remove devices will need to be added into the Tuya integration. |
I'm trying to solve the issue with Tuya API (see issue #36744). |
I was thinking more about this, and dealing with the devices would probably be easier if every scene didn't create a new device as, at least for me, I'm more likely to be removing scenes than physical devices. |
I start to apply fix for this here, I will PR the fix to HA integration when we will found a solution for Tuya API issues. |
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. |
Sorry I have the same issue I can't delete some old device from Tuya. I tried to delete the Tuya integration but I can't too, any error just it doesn't delete. Finally I just disable it. |
This specific issue will be fixed by PR #41375. |
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. |
So it is not possible to delete individual devices? |
The problem
When a device or a scene is removed from the Tuya or Smart Life app, the Tuya integration removes the entity for that device, but doesn't remove the device (which cannot be manually deleted as far as I can tell).
This can be demonstrated by:
There will now be an empty device for that scene containing no entities.
Environment
Problem-relevant
configuration.yaml
Traceback/Error logs
Additional information
The text was updated successfully, but these errors were encountered: