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
73.9k stars 30.97k forks source link

entities for removed bridge networks of [glances] integration are left over as unavailable #124563

Open janusn opened 3 months ago

janusn commented 3 months ago

The problem

I have machines that run docker. The bridge networks for docker containers are frequently created and dropped as images are updated. It leaves tons of obsolete network entities on glances devices. Of course I know I can delete them manually but it is a tedious task to keep up with.

Please remove obsolete network entities from the glances devices. Screenshot 2024-08-25 at 01 03 38

What version of Home Assistant Core has the issue?

core-2024.8.2

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Container

Integration causing the issue

Glances

Link to integration documentation on our website

No response

Diagnostics information

I guess diagnostics data is irrelevant for this feature.

Example YAML snippet

Sorry, I configure the Glances integration on WebUI.

Anything in the logs that might be useful for us?

I guess not.

Additional information

No response

home-assistant[bot] commented 3 months ago

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

Code owner commands Code owners of `glances` 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 glances` 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)


glances documentation glances source (message by IssueLinks)

engrbm87 commented 3 months ago

You can try disabling the system option "enable newly added entities". This will stop adding these new entities

janusn commented 3 months ago

You can try disabling the system option "enable newly added entities". This will stop adding these new entities

Thanks for your suggestion.

I have no problem with new entities being added as the corresponding networks were added in glances.

However, I would prefer there is an option for auto-removal of obsolete entities when the corresponding networks are dropped from the target machine.

ClearlyDazed commented 2 weeks ago

I would like to add if the option to hide network interfaces be included. Home Assistant local glances is reporting over 500 entities, the vast majority being veth------- as unavailable. Home Assistant has an glances.config file, but adding hide=veth* and restarting does not work.

janusn commented 3 days ago

The integration does know it no longer provides the entities integration. Screenshot 2024-11-20 at 15 45 20

I have tried to bulk delete them through Setting->Devices & services->Entities. Unfortunately, they are not showing up with filter "Unavailable". Screenshot 2024-11-20 at 15 46 57

Nor the bulk delete work. The only way to delete them without adding the integration again is through the Settings->Devices & services->Devices->[Devices] page. Each entities takes 4 precise clicks. As tens are added every week on each instance of Home Assistant, it is not a task human can keep up with.