mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Avoid linear search in homekit to find devices (#114808)
This commit is contained in:
parent
86feae421c
commit
5be5c37326
@ -953,9 +953,8 @@ class HomeKit:
|
||||
"""Purge bridges that exist from failed pairing or manual resets."""
|
||||
devices_to_purge = [
|
||||
entry.id
|
||||
for entry in dev_reg.devices.values()
|
||||
if self._entry_id in entry.config_entries
|
||||
and (
|
||||
for entry in dev_reg.devices.get_devices_for_config_entry_id(self._entry_id)
|
||||
if (
|
||||
identifier not in entry.identifiers # type: ignore[comparison-overlap]
|
||||
or connection not in entry.connections
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user