1 """Provides device automations for Fan."""
3 from __future__
import annotations
5 import voluptuous
as vol
8 async_validate_entity_schema,
17 _ACTION_SCHEMA = toggle_entity.ACTION_SCHEMA.extend({vol.Required(CONF_DOMAIN): DOMAIN})
21 hass: HomeAssistant, config: ConfigType
23 """Validate config."""
28 hass: HomeAssistant, device_id: str
29 ) -> list[dict[str, str]]:
30 """List device actions for Fan devices."""
31 return await toggle_entity.async_get_actions(hass, device_id, DOMAIN)
37 variables: TemplateVarsType,
38 context: Context |
None,
40 """Execute a device action."""
41 await toggle_entity.async_call_action_from_config(
42 hass, config, variables, context, DOMAIN
ConfigType async_validate_entity_schema(HomeAssistant hass, ConfigType config, VolSchemaType schema)
list[dict[str, str]] async_get_actions(HomeAssistant hass, str device_id)
ConfigType async_validate_action_config(HomeAssistant hass, ConfigType config)
None async_call_action_from_config(HomeAssistant hass, ConfigType config, TemplateVarsType variables, Context|None context)