Adjust entity registry access in core platforms (#88944)

* Adjust entity registry access in platforms

* Adjust more core components
This commit is contained in:
epenet 2023-03-01 08:02:16 +01:00 committed by GitHub
parent 50f908ce2d
commit f2b736fad0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
37 changed files with 154 additions and 121 deletions

View file

@ -29,7 +29,7 @@ import voluptuous as vol
from homeassistant.const import ATTR_UNIT_OF_MEASUREMENT
from homeassistant.core import Event, HomeAssistant, callback, valid_entity_id
from homeassistant.exceptions import HomeAssistantError
from homeassistant.helpers import entity_registry
from homeassistant.helpers import entity_registry as er
from homeassistant.helpers.json import JSONEncoder
from homeassistant.helpers.start import async_at_start
from homeassistant.helpers.storage import STORAGE_DIR
@ -338,7 +338,7 @@ def async_setup(hass: HomeAssistant) -> None:
def setup_entity_registry_event_handler(hass: HomeAssistant) -> None:
"""Subscribe to event registry events."""
hass.bus.async_listen(
entity_registry.EVENT_ENTITY_REGISTRY_UPDATED,
er.EVENT_ENTITY_REGISTRY_UPDATED,
_async_entity_id_changed,
event_filter=entity_registry_changed_filter,
)