Unifi Integration syncing devices from environment scans

I live on a main road and so I have a lot of people and cars driving past all the time, in the Unifi Wifi Insights - Environment scan there are constantly dozens of mobiles and car wifi devices picked. I guess most of these will be detected fleetingly, but perhaps there are some that are detected more often i.e. people who pass by frequently, not that I’m sure if that is an issue.

The issue I have however, is that despite these not showing up as clients in Unifi, as they never are actually connected to my network, they are syncing in to home assistant as devices. I think they do possibly clean up as there are only 142 devices of which about 70 are my actual devices and not thousands. But it would be good if I could some how only have devices that are in fact connected to my network sync’d so I can track and see what I’m interested in and not flood home assistant with loads of nonsense. I’ve got things like my Guest Wifi network excluded as I’m not interested in tracking guest devices either in home assistant.

Any ideas would be greatly appreciated!

One last thing… I did try calling the the UNIFI.REMOVE_CLIENTS service, but it just said failed for unknown reason. I didn’t add anything in the data block but also couldn’t see any documentation on whether I need to specify the devices I want to remove or whether it just gets rid of devices that only connected for a short time.

Limit what gets brought into HA to only devices that actually connect. I have Unifi and I do not have this problem. I looked at the configuration and I do not see an option to add or block nearby devices. I live in a pretty densely populated area and I know Unifi is detecting my neighbor’s APs and cars but I do not see it brought into HA.

How do I set it to limit to devices that actually connect? I can’t see any options to restrict by that?