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

Functions

CALLBACK_TYPE async_attach_trigger (HomeAssistant hass, ConfigType config, TriggerActionType action, TriggerInfo trigger_info)
 

Variables

 TRIGGER_SCHEMA
 

Detailed Description

Offer sun based automation rules.

Function Documentation

◆ async_attach_trigger()

CALLBACK_TYPE homeassistant.components.sun.trigger.async_attach_trigger ( HomeAssistant  hass,
ConfigType  config,
TriggerActionType  action,
TriggerInfo  trigger_info 
)
Listen for events based on configuration.

Definition at line 28 of file trigger.py.

Variable Documentation

◆ TRIGGER_SCHEMA

homeassistant.components.sun.trigger.TRIGGER_SCHEMA
Initial value:
1 = cv.TRIGGER_BASE_SCHEMA.extend(
2  {
3  vol.Required(CONF_PLATFORM): "sun",
4  vol.Required(CONF_EVENT): cv.sun_event,
5  vol.Required(CONF_OFFSET, default=timedelta(0)): cv.time_period,
6  }
7 )

Definition at line 19 of file trigger.py.