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
|
@ -14,7 +14,7 @@ from homeassistant.const import (
|
|||
)
|
||||
from homeassistant.core import Context, HomeAssistant
|
||||
from homeassistant.exceptions import HomeAssistantError
|
||||
from homeassistant.helpers import entity_registry
|
||||
from homeassistant.helpers import entity_registry as er
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
from homeassistant.helpers.entity import get_capability
|
||||
from homeassistant.helpers.typing import ConfigType, TemplateVarsType
|
||||
|
@ -74,7 +74,7 @@ async def async_get_actions(
|
|||
hass: HomeAssistant, device_id: str
|
||||
) -> list[dict[str, str]]:
|
||||
"""List device actions for Select devices."""
|
||||
registry = entity_registry.async_get(hass)
|
||||
registry = er.async_get(hass)
|
||||
return [
|
||||
{
|
||||
CONF_DEVICE_ID: device_id,
|
||||
|
@ -89,7 +89,7 @@ async def async_get_actions(
|
|||
SERVICE_SELECT_OPTION,
|
||||
SERVICE_SELECT_PREVIOUS,
|
||||
)
|
||||
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
|
||||
]
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue