Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.homeassistant.triggers.time_pattern Namespace Reference

Classes

class  TimePattern
 

Functions

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

Variables

string CONF_HOURS = "hours"
 
string CONF_MINUTES = "minutes"
 
string CONF_SECONDS = "seconds"
 
 TRIGGER_SCHEMA
 

Detailed Description

Offer time listening automation rules.

Function Documentation

◆ async_attach_trigger()

CALLBACK_TYPE homeassistant.components.homeassistant.triggers.time_pattern.async_attach_trigger ( HomeAssistant  hass,
ConfigType  config,
TriggerActionType  action,
TriggerInfo  trigger_info 
)
Listen for state changes based on configuration.

Definition at line 64 of file time_pattern.py.

Variable Documentation

◆ CONF_HOURS

string homeassistant.components.homeassistant.triggers.time_pattern.CONF_HOURS = "hours"

Definition at line 17 of file time_pattern.py.

◆ CONF_MINUTES

string homeassistant.components.homeassistant.triggers.time_pattern.CONF_MINUTES = "minutes"

Definition at line 18 of file time_pattern.py.

◆ CONF_SECONDS

string homeassistant.components.homeassistant.triggers.time_pattern.CONF_SECONDS = "seconds"

Definition at line 19 of file time_pattern.py.

◆ TRIGGER_SCHEMA

homeassistant.components.homeassistant.triggers.time_pattern.TRIGGER_SCHEMA
Initial value:
1 = vol.All(
2  cv.TRIGGER_BASE_SCHEMA.extend(
3  {
4  vol.Required(CONF_PLATFORM): "time_pattern",
5  CONF_HOURS: TimePattern(maximum=23),
6  CONF_MINUTES: TimePattern(maximum=59),
7  CONF_SECONDS: TimePattern(maximum=59),
8  }
9  ),
10  cv.has_at_least_one_key(CONF_HOURS, CONF_MINUTES, CONF_SECONDS),
11 )

Definition at line 51 of file time_pattern.py.