Adjust entity registry access in core platforms (#88944)
* Adjust entity registry access in platforms * Adjust more core components
This commit is contained in:
parent
50f908ce2d
commit
f2b736fad0
37 changed files with 154 additions and 121 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue