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

@ -11,7 +11,7 @@ from homeassistant.const import (
CONF_TYPE,
)
from homeassistant.core import Context, HomeAssistant
from homeassistant.helpers import entity_registry
from homeassistant.helpers import entity_registry as er
import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.typing import ConfigType, TemplateVarsType
@ -32,11 +32,11 @@ async def async_get_actions(
hass: HomeAssistant, device_id: str
) -> list[dict[str, str]]:
"""List device actions for Number."""
registry = entity_registry.async_get(hass)
registry = er.async_get(hass)
actions: list[dict[str, str]] = []
# Get all the integrations entities for this device
for entry in entity_registry.async_entries_for_device(registry, device_id):
for entry in er.async_entries_for_device(registry, device_id):
if entry.domain != DOMAIN:
continue