mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +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_reg = dr.async_get(hass)
|
||||||
dev_ids = {
|
dev_ids = {
|
||||||
identifier[1]
|
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
|
for identifier in device.identifiers
|
||||||
if identifier[0] == OT_DOMAIN
|
|
||||||
}
|
}
|
||||||
|
|
||||||
entities = []
|
entities = []
|
||||||
|
Loading…
x
Reference in New Issue
Block a user