mirror of
https://github.com/home-assistant/core
synced 2024-09-12 15:16:21 +02:00
Fix restoring UniFi clients with old unique id (#105691)
Fix restoring UniFi clients with bad unique id
This commit is contained in:
parent
72cb21d875
commit
7084889b78
@ -260,8 +260,8 @@ class UniFiController:
|
||||
for entry in async_entries_for_config_entry(
|
||||
entity_registry, self.config_entry.entry_id
|
||||
):
|
||||
if entry.domain == Platform.DEVICE_TRACKER:
|
||||
macs.append(entry.unique_id.split("-", 1)[0])
|
||||
if entry.domain == Platform.DEVICE_TRACKER and "-" in entry.unique_id:
|
||||
macs.append(entry.unique_id.split("-", 1)[1])
|
||||
|
||||
for mac in self.option_supported_clients + self.option_block_clients + macs:
|
||||
if mac not in self.api.clients and mac in self.api.clients_all:
|
||||
|
Loading…
Reference in New Issue
Block a user