Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.template.trigger Namespace Reference

Functions

CALLBACK_TYPE async_attach_trigger (HomeAssistant hass, ConfigType config, TriggerActionType action, TriggerInfo trigger_info, *str platform_type="template")
 

Variables

 _LOGGER = logging.getLogger(__name__)
 
 TRIGGER_SCHEMA
 

Detailed Description

Offer template automation rules.

Function Documentation

◆ async_attach_trigger()

CALLBACK_TYPE homeassistant.components.template.trigger.async_attach_trigger ( HomeAssistant  hass,
ConfigType  config,
TriggerActionType  action,
TriggerInfo  trigger_info,
*str   platform_type = "template" 
)
Listen for state changes based on configuration.

Definition at line 41 of file trigger.py.

Variable Documentation

◆ _LOGGER

homeassistant.components.template.trigger._LOGGER = logging.getLogger(__name__)
private

Definition at line 30 of file trigger.py.

◆ TRIGGER_SCHEMA

homeassistant.components.template.trigger.TRIGGER_SCHEMA
Initial value:
1 = cv.TRIGGER_BASE_SCHEMA.extend(
2  {
3  vol.Required(CONF_PLATFORM): "template",
4  vol.Required(CONF_VALUE_TEMPLATE): cv.template,
5  vol.Optional(CONF_FOR): cv.positive_time_period_template,
6  }
7 )

Definition at line 32 of file trigger.py.