mirror of
https://github.com/home-assistant/core.git
synced 2025-07-25 22:27:07 +00:00
Avoid linear search of entity registry in nmap_tracker (#109640)
This commit is contained in:
parent
bc45b31335
commit
113d38361d
@ -191,8 +191,9 @@ class NmapDeviceScanner:
|
|||||||
registry = er.async_get(self._hass)
|
registry = er.async_get(self._hass)
|
||||||
self._known_mac_addresses = {
|
self._known_mac_addresses = {
|
||||||
entry.unique_id: entry.original_name
|
entry.unique_id: entry.original_name
|
||||||
for entry in registry.entities.values()
|
for entry in registry.entities.get_entries_for_config_entry_id(
|
||||||
if entry.config_entry_id == self._entry_id
|
self._entry_id
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
Loading…
x
Reference in New Issue
Block a user