mirror of
https://github.com/home-assistant/core.git
synced 2025-08-07 06:35:10 +02:00
Avoid linear search of entity registry in nmap_tracker (#109640)
This commit is contained in:
@@ -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
|
||||||
|
Reference in New Issue
Block a user