home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
71.14k stars 29.82k forks source link

Unable to remove decommissioned devices #123130

Open iampegram opened 1 month ago

iampegram commented 1 month ago

The problem

As stated in #97393, devices that have been removed from the Omada controller still show in Home Assistant.

What version of Home Assistant Core has the issue?

core-2024.7.4

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

TP-Link Omada

Link to integration documentation on our website

https://www.home-assistant.io/integrations/tplink

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

home-assistant[bot] commented 1 month ago

Hey there @rytilahti, @bdraco, @sdb9696, mind taking a look at this issue as it has been labeled with an integration (tplink) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `tplink` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign tplink` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


tplink documentation tplink source (message by IssueLinks)

home-assistant[bot] commented 1 month ago

Hey there @markgodwin, mind taking a look at this issue as it has been labeled with an integration (tplink_omada) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `tplink_omada` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign tplink_omada` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


tplink_omada documentation tplink_omada source (message by IssueLinks)

MarkGodwin commented 1 month ago

The integration finds all of the registered devices when the integration is loaded. However, if a devices is no longer registered in the Omada controller, when the the integration is reloaded (or when HA is restarted), the entities for that device should be removed, and I think the device should disappear when there are no more entities. Are you seeing something different?

Is the device no longer visible in the Omada controller itself?

iampegram commented 1 month ago

The device (ER605) hasn't been connected to my network for over a year. I removed it from the controller when I got my ER7206. Both the controller and home assistant have been restarted numerous times since.

I deleted the associated entities, restarted HA, and the device is still there.

For what it's worth, my Kasa devices are also listed among the Omada devices. That's in addition to their entries under the TP-Link Smart Home integration (thankfully, they both point to the same entities). I didn't know if this is a related issue.

iampegram commented 1 month ago

Here are screenshots. I can provide logs if you'd like.

Screenshot_20240805_233046_Home Assistant Screenshot_20240805_232959_Home Assistant