mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
Adjust device_automation type hints in zwave_js (#72143)
This commit is contained in:
parent
df3e3b52a0
commit
5bb39a1db5
@ -27,7 +27,7 @@ from homeassistant.core import Context, HomeAssistant
|
|||||||
from homeassistant.exceptions import HomeAssistantError
|
from homeassistant.exceptions import HomeAssistantError
|
||||||
from homeassistant.helpers import entity_registry
|
from homeassistant.helpers import entity_registry
|
||||||
import homeassistant.helpers.config_validation as cv
|
import homeassistant.helpers.config_validation as cv
|
||||||
from homeassistant.helpers.typing import ConfigType
|
from homeassistant.helpers.typing import ConfigType, TemplateVarsType
|
||||||
|
|
||||||
from .config_validation import VALUE_SCHEMA
|
from .config_validation import VALUE_SCHEMA
|
||||||
from .const import (
|
from .const import (
|
||||||
@ -141,7 +141,9 @@ ACTION_SCHEMA = vol.Any(
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
async def async_get_actions(hass: HomeAssistant, device_id: str) -> list[dict]:
|
async def async_get_actions(
|
||||||
|
hass: HomeAssistant, device_id: str
|
||||||
|
) -> list[dict[str, Any]]:
|
||||||
"""List device actions for Z-Wave JS devices."""
|
"""List device actions for Z-Wave JS devices."""
|
||||||
registry = entity_registry.async_get(hass)
|
registry = entity_registry.async_get(hass)
|
||||||
actions = []
|
actions = []
|
||||||
@ -238,7 +240,10 @@ async def async_get_actions(hass: HomeAssistant, device_id: str) -> list[dict]:
|
|||||||
|
|
||||||
|
|
||||||
async def async_call_action_from_config(
|
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:
|
) -> None:
|
||||||
"""Execute a device action."""
|
"""Execute a device action."""
|
||||||
action_type = service = config[CONF_TYPE]
|
action_type = service = config[CONF_TYPE]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user