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
|
@ -20,7 +20,7 @@ from homeassistant.const import (
|
|||
)
|
||||
from homeassistant.core import CALLBACK_TYPE, HomeAssistant
|
||||
from homeassistant.exceptions import HomeAssistantError
|
||||
from homeassistant.helpers import config_validation as cv, entity_registry
|
||||
from homeassistant.helpers import config_validation as cv, entity_registry as er
|
||||
from homeassistant.helpers.entity import get_capability
|
||||
from homeassistant.helpers.trigger import TriggerActionType, TriggerInfo
|
||||
from homeassistant.helpers.typing import ConfigType
|
||||
|
@ -44,7 +44,7 @@ async def async_get_triggers(
|
|||
hass: HomeAssistant, device_id: str
|
||||
) -> list[dict[str, str]]:
|
||||
"""List device triggers for Select devices."""
|
||||
registry = entity_registry.async_get(hass)
|
||||
registry = er.async_get(hass)
|
||||
return [
|
||||
{
|
||||
CONF_PLATFORM: "device",
|
||||
|
@ -53,7 +53,7 @@ async def async_get_triggers(
|
|||
CONF_ENTITY_ID: entry.entity_id,
|
||||
CONF_TYPE: "current_option_changed",
|
||||
}
|
||||
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