diff --git a/homeassistant/components/unifi/device_tracker.py b/homeassistant/components/unifi/device_tracker.py index 0ad1c920fa7..2ae8eb2e32b 100644 --- a/homeassistant/components/unifi/device_tracker.py +++ b/homeassistant/components/unifi/device_tracker.py @@ -107,11 +107,11 @@ def add_client_entities(controller, async_add_entities, clients): trackers = [] for mac in clients: - if mac in controller.entities[DOMAIN][UniFiClientTracker.TYPE]: + if mac in controller.entities[DOMAIN][UniFiClientTracker.TYPE] or not ( + client := controller.api.clients.get(mac) + ): continue - client = controller.api.clients[mac] - if mac not in controller.wireless_clients: if not controller.option_track_wired_clients: continue