Use entity_registry async_get for AsusWrt (#58885)
This commit is contained in:
parent
f51e1fcb67
commit
20a443ad6c
1 changed files with 4 additions and 5 deletions
|
@ -24,6 +24,7 @@ from homeassistant.const import (
|
|||
)
|
||||
from homeassistant.core import CALLBACK_TYPE, HomeAssistant, callback
|
||||
from homeassistant.exceptions import ConfigEntryNotReady
|
||||
from homeassistant.helpers import entity_registry as er
|
||||
from homeassistant.helpers.dispatcher import async_dispatcher_send
|
||||
from homeassistant.helpers.entity import DeviceInfo
|
||||
from homeassistant.helpers.event import async_track_time_interval
|
||||
|
@ -249,11 +250,9 @@ class AsusWrtRouter:
|
|||
self._sw_v = f"{firmware['firmver']} (build {firmware['buildno']})"
|
||||
|
||||
# Load tracked entities from registry
|
||||
entity_registry = await self.hass.helpers.entity_registry.async_get_registry()
|
||||
track_entries = (
|
||||
self.hass.helpers.entity_registry.async_entries_for_config_entry(
|
||||
entity_registry, self._entry.entry_id
|
||||
)
|
||||
track_entries = er.async_entries_for_config_entry(
|
||||
er.async_get(self.hass),
|
||||
self._entry.entry_id,
|
||||
)
|
||||
for entry in track_entries:
|
||||
if entry.domain == TRACKER_DOMAIN:
|
||||
|
|
Loading…
Add table
Reference in a new issue