Unifi integration works incorrectly with filters
See original GitHub issueThe problem
I use Unifi integration in order to manage net devices, connected to unifi router and APs. I have several wi-fi networks and use network filter in the integration settings. But nevertheless I face the next issue on regular basis:
- In case when new network device appears in the wi-fi network, that excluded in the integration settings, this device appears as device_tracker in HA and doesn’t disappear unless you remove/add Unifi integration again.



- Moreover, you can’t remove some of these device_trackers via HA Configuration/Entities tool - nothing happens if you try to do it. Some of such devices have empty device card.


As a result, I have 150+ devices/entities in HA while there are only about 10 devices in the selected filtered Unifi network.
Expected behaviour:
- Devices, connected to the Unifi wi-fi network which is not included into the integration settings filter, should not appear in HA.
- It should not be any devices of the Unifi integration without device_tracker sensor.
What version of Home Assistant Core has the issue?
core-2021.12.4
What was the last working version of Home Assistant Core?
None
What type of installation are you running?
Home Assistant Container
Integration causing the issue
Unifi
Link to integration documentation on our website
https://www.home-assistant.io/integrations/unifi/
Example YAML snippet
GUI settings of the integration
Anything in the logs that might be useful for us?
No response
Additional information
No response
Issue Analytics
- State:
- Created 2 years ago
- Reactions:5
- Comments:71 (16 by maintainers)
Top Results From Across the Web
Unifi SSID filtering not working - Home Assistant Community
Anyone else having issues with Unifi SSID filtering? It does not seem to work and wired devices are also tracked. This is very...
Read more >Unifi integration imports all devices before SSID filtering #43577
The problem When adding the Ubiquity Unifi integration you are prompted to type in the Host, Username, Password, and Port of the Unifi...
Read more >Unifi USG Content Filtering - Ubiquiti Community
Hello,. New to Unifi and looking for the best way to setup simple web filtering on the Unifi Security Gateway. Currently on 4.2.0.4705016....
Read more >UniFi Network Controller 6.1.71 | Ubiquiti Community
Add "Clear Filter" buttons when no content is displayed in Client and Device section. ... Applying changes to UBB does not work in...
Read more >An optimal configuration for a Unifi Managed Network & Sonos
Sonos worked, but not very well. Once music was playing it was great, but getting the Sonos controllers to see/communicate with the speakers...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I see a lot of similar entities like these:
I know that initial reason is the bug of Unifi Controller that sometimes add such “hosts” to Unifi Clients, but the bug of the integration that that items can’t be removed from HA and they don’t disappear from HA by themselves. You can see on the screen above that I can select these items, but ‘delete’ button doesn’t delete them. Here is how the entity card looks like:
Expected behaviour: 1) add ability to remove ‘orphaned’ Unifi entities, 2) add to integration filter to show only ‘Configures’ clients:
bump