Adjust device_automation type hints in core platforms 2/3 (#72210)
This commit is contained in:
parent
b10ee779f9
commit
3a0e816f1b
12 changed files with 38 additions and 28 deletions
|
@ -17,6 +17,7 @@ from homeassistant.core import Context, HomeAssistant
|
|||
from homeassistant.helpers import entity_registry
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
from homeassistant.helpers.entity import get_supported_features
|
||||
from homeassistant.helpers.typing import ConfigType, TemplateVarsType
|
||||
|
||||
from . import DOMAIN, LockEntityFeature
|
||||
|
||||
|
@ -61,7 +62,10 @@ async def async_get_actions(
|
|||
|
||||
|
||||
async def async_call_action_from_config(
|
||||
hass: HomeAssistant, config: dict, variables: dict, context: Context | None
|
||||
hass: HomeAssistant,
|
||||
config: ConfigType,
|
||||
variables: TemplateVarsType,
|
||||
context: Context | None,
|
||||
) -> None:
|
||||
"""Execute a device action."""
|
||||
service_data = {ATTR_ENTITY_ID: config[CONF_ENTITY_ID]}
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
"""Provides device automations for Lock."""
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Any
|
||||
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.components.automation import (
|
||||
|
@ -43,7 +41,7 @@ TRIGGER_SCHEMA = DEVICE_TRIGGER_BASE_SCHEMA.extend(
|
|||
|
||||
async def async_get_triggers(
|
||||
hass: HomeAssistant, device_id: str
|
||||
) -> list[dict[str, Any]]:
|
||||
) -> list[dict[str, str]]:
|
||||
"""List device triggers for Lock devices."""
|
||||
registry = entity_registry.async_get(hass)
|
||||
triggers = []
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue