Avoid linear search in geofency to find devices (#114810)
This commit is contained in:
parent
c7d1319acf
commit
a83d5e4071
1 changed files with 3 additions and 2 deletions
|
@ -38,9 +38,10 @@ 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(
|
||||||
|
config_entry.entry_id
|
||||||
|
)
|
||||||
for identifier in device.identifiers
|
for identifier in device.identifiers
|
||||||
if identifier[0] == GF_DOMAIN
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if dev_ids:
|
if dev_ids:
|
||||||
|
|
Loading…
Add table
Reference in a new issue