1 """Provides device actions for remotes."""
3 from __future__
import annotations
5 import voluptuous
as vol
8 async_validate_entity_schema,
19 _ACTION_SCHEMA = toggle_entity.ACTION_SCHEMA.extend({vol.Required(CONF_DOMAIN): DOMAIN})
23 hass: HomeAssistant, config: ConfigType
25 """Validate config."""
32 variables: TemplateVarsType,
33 context: Context |
None,
35 """Change state based on configuration."""
36 await toggle_entity.async_call_action_from_config(
37 hass, config, variables, context, DOMAIN
42 hass: HomeAssistant, device_id: str
43 ) -> list[dict[str, str]]:
44 """List device actions."""
45 return await toggle_entity.async_get_actions(hass, device_id, DOMAIN)
ConfigType async_validate_entity_schema(HomeAssistant hass, ConfigType config, VolSchemaType schema)
ConfigType async_validate_action_config(HomeAssistant hass, ConfigType config)
None async_call_action_from_config(HomeAssistant hass, ConfigType config, TemplateVarsType variables, Context|None context)
list[dict[str, str]] async_get_actions(HomeAssistant hass, str device_id)