Skip to content
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

Deleting a device does not fully remove it #340

Open
talormanda opened this issue Oct 28, 2024 · 6 comments
Open

Deleting a device does not fully remove it #340

talormanda opened this issue Oct 28, 2024 · 6 comments

Comments

@talormanda
Copy link

Configuration

image

Describe the bug

I added a device, removed it, restarted. It still shows there are 2 devices, yet only one is configured. Visiting the device, all the sensors it created are still there, but marked "unavailable".

Diagnostics

config_entry-bermuda-01JB73J0XCQ8R4BN0JZ10J4B1A.json

@agittins
Copy link
Owner

Yes, I think this is normal? Bermuda is no longer creating the device at start-up, but HA is restoring it when it starts up. After some period of time (minutes?) HA will decide that Bermuda is no longer creating those entities, and will let you delete them.

I am wondering though if maybe Bermuda should be deleting them... but I suspect not, since deleting/recreating a device is something one might want to do without having all the old history deleted in the process. Maybe there's a best-practice guide on that somewhere...

@talormanda
Copy link
Author

talormanda commented Oct 28, 2024

Yes, I think this is normal? Bermuda is no longer creating the device at start-up, but HA is restoring it when it starts up. After some period of time (minutes?) HA will decide that Bermuda is no longer creating those entities, and will let you delete them.

I am wondering though if maybe Bermuda should be deleting them... but I suspect not, since deleting/recreating a device is something one might want to do without having all the old history deleted in the process. Maybe there's a best-practice guide on that somewhere...

I figured it would at least remove the sensors it created, because when I go and look at the integration, it says there are "2" devices. And the one I deleted is still counted, when I believe it really shouldn't be. On top of that, I have to now go in and manually delete 10+ sensors that are disabled / unavailable. Not very fun!

@agittins
Copy link
Owner

I agree that it's not a great experience!

Does this not work for you? There's a hidden option on the device page (but they don't seem to expose it on the device list ui):
image

@talormanda
Copy link
Author

Mine didnt exactly look like that because it merged onto another device page. I had picked my switchbot curtain, so it merged bermuda sensors onto the switchbot ones. I can try cloning my VM and testing to see if that option pops up later tonight. (I just dont want to really delete / re-add over and over)

@agittins
Copy link
Owner

Multi-integration devices should still work, the delete option changes depending on which path you came to the device through:

image

The main problem I think is that this option is just not very visible, and if you don't know to look for it one would never find it, since you can delete other stuff like entities OK, except for the disabled ones... it's confusing.

Oh, also - if HA hasn't been restarted since the device was removed from Bermuda (or any other integration), it may not show the device as being able to be removed, and the delete option won't appear. It's doubly-frustrating!

@talormanda
Copy link
Author

It's possible that is all it is, I will check.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants