mirror of
https://github.com/home-assistant/core.git
synced 2025-07-27 07:07:28 +00: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(
|
for entry in async_entries_for_config_entry(
|
||||||
entity_registry, self.config_entry.entry_id
|
entity_registry, self.config_entry.entry_id
|
||||||
):
|
):
|
||||||
if entry.domain == Platform.DEVICE_TRACKER:
|
if entry.domain == Platform.DEVICE_TRACKER and "-" in entry.unique_id:
|
||||||
macs.append(entry.unique_id.split("-", 1)[0])
|
macs.append(entry.unique_id.split("-", 1)[1])
|
||||||
|
|
||||||
for mac in self.option_supported_clients + self.option_block_clients + macs:
|
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:
|
if mac not in self.api.clients and mac in self.api.clients_all:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user