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

Fritz!Box Integration Shows Incorrect Number of Devices and Entities #138963

Closed
Ashcora opened this issue Feb 20, 2025 · 7 comments
Closed

Fritz!Box Integration Shows Incorrect Number of Devices and Entities #138963

Ashcora opened this issue Feb 20, 2025 · 7 comments
Assignees

Comments

@Ashcora
Copy link

Ashcora commented Feb 20, 2025

Description:
Currently, the Fritz!Box integration in Home Assistant is showing significantly more devices and entities than are actually present in my network. I have about 50 devices on the network, but Home Assistant is showing 236 devices and 541 entities. This discrepancy primarily affects non-existent devices that are still visible as entities in Home Assistant.

Steps to Reproduce:

  1. Configure Fritz!Box integration in Home Assistant.
  2. Load network devices with the active Fritz!Box integration.
  3. Observe that after a certain Home Assistant shows far more devices than exist on the network and keeps these entries like forever (for me it is showing devices that were not in service since beginning of 2024 anymore, there have been many reboots of the FritzBox as well as Home Assistant, and I also clicked the "cleanup" button in the FritzBox for unused connections and/or deleted devices manually).
  4. Old or non-existent devices continue to appear as entities in Home Assistant.

Expected Behavior:
Home Assistant should only display the actual active devices and entities from the Fritz!Box that are present on the network. Old or disconnected devices should no longer appear (rubbish collector / cleanup interval).

Actual Behavior:
Home Assistant shows a much larger number of devices and entities than are actually on the network. Devices that are no longer active or were removed a long time ago continue to show up.

What version of Home Assistant Core has the issue?

core-2025.2.4

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

AVM FRITZ!Box Tools

Link to integration documentation on our website

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

Diagnostics information

Home Assistant
Image

FritzBox:

Image

plus ~30 devices being "offline"/"unused"

Example YAML snippet

Anything in the logs that might be useful for us?

FRITZ!OS: 8.02

Additional information

  • I have verified that all devices have been properly deleted from the Fritz!Box.
  • The issue persists after both restarting the Fritz!Box and restarting Home Assistant.
  • Devices remain visible in Home Assistant even after being removed from the device list.
@home-assistant
Copy link

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

Code owner commands

Code owners of fritz 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 fritz 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)


fritz documentation
fritz source
(message by IssueLinks)

@mib1185
Copy link
Contributor

mib1185 commented Feb 21, 2025

Are these entities in state unavailable?
Further as described in the Troubleshooting section of the docs, please provide the diagnostics data (debug log is not necessary for now)

@Ashcora
Copy link
Author

Ashcora commented Feb 21, 2025

Thanks, @mib1185 , for reaching out that quick.

In the details of the meant devices, there is a note stating "This entity is no longer provided by the “fritz” integration. If the entity is no longer used, delete it in the settings"

Image

Does it mean, that each and every device needs to be cleaned up manually? If so, might it be senseful to raise a feature request to implement the possibility to define a "retention period" and/or the auto cleanup (if e.g. a device is not logged in or seen for xy days) for the integration' devices?

@mib1185
Copy link
Contributor

mib1185 commented Feb 21, 2025

They should usually be cleaned up automatically, but there is also a button entity called "Cleanup" (Aufräumen) which should remove orphan entities and devices

@Ashcora
Copy link
Author

Ashcora commented Feb 21, 2025

Do you mean within the Fritz!Box UI?

Image

I use this button regularly, especially when working with Docker containers or VMs.
This is where the problem starts: I can clean up the Fritz!Box, and entries will disappear there.
However, in Home Assistant, they remain in the list.

@mib1185
Copy link
Contributor

mib1185 commented Feb 21, 2025

nope - I mean in HA, you will find this button under the device, which represents the fritzbox itself

@Ashcora
Copy link
Author

Ashcora commented Feb 21, 2025

Okay, this is a game changer now 🥇

Image

It is quite hidden (I expected it to be in overview), but it works perfectly.
THANK YOU, @mib1185, for your excellent support and individual assistance! Much appreciated ⭐⭐⭐⭐⭐

(if it would be possible to have it automated, in best case with the possibility to define the "retention time" for the devices, this would be a really nice to have)

@Ashcora Ashcora closed this as completed Feb 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants