mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 20:57:21 +00:00
Avoid linear search in owntracks to find devices (#114812)
This commit is contained in:
parent
c798128ef1
commit
c7d1319acf
@ -30,9 +30,8 @@ async def async_setup_entry(
|
||||
dev_reg = dr.async_get(hass)
|
||||
dev_ids = {
|
||||
identifier[1]
|
||||
for device in dev_reg.devices.values()
|
||||
for device in dev_reg.devices.get_devices_for_config_entry_id(entry.entry_id)
|
||||
for identifier in device.identifiers
|
||||
if identifier[0] == OT_DOMAIN
|
||||
}
|
||||
|
||||
entities = []
|
||||
|
Loading…
x
Reference in New Issue
Block a user