mirror of
https://github.com/home-assistant/core.git
synced 2025-07-16 09:47:13 +00:00
Avoid linear search in gpslogger to find devices (#114811)
This commit is contained in:
parent
a83d5e4071
commit
9189cd5ec2
@ -48,9 +48,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] == GPL_DOMAIN
|
||||
}
|
||||
if not dev_ids:
|
||||
return
|
||||
|
Loading…
x
Reference in New Issue
Block a user