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

Classes

class  TrackEntity
 

Functions

CALLBACK_TYPE async_attach_trigger (HomeAssistant hass, ConfigType config, TriggerActionType action, TriggerInfo trigger_info)
 
template.Template valid_at_template (Any value)
 

Variables

 _TIME_AT_SCHEMA = vol.Any(cv.time, _TIME_TRIGGER_ENTITY)
 
 _TIME_TRIGGER_ENTITY = vol.All(str, cv.entity_domain(["input_datetime", "sensor"]))
 
 _TIME_TRIGGER_ENTITY_WITH_OFFSET
 
 _TIME_TRIGGER_SCHEMA
 
 TRIGGER_SCHEMA
 

Detailed Description

Offer time listening automation rules.

Function Documentation

◆ async_attach_trigger()

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

Definition at line 88 of file time.py.

◆ valid_at_template()

template.Template homeassistant.components.homeassistant.triggers.time.valid_at_template ( Any  value)
Validate either a jinja2 template, valid time, or valid trigger entity.

Definition at line 51 of file time.py.

Variable Documentation

◆ _TIME_AT_SCHEMA

homeassistant.components.homeassistant.triggers.time._TIME_AT_SCHEMA = vol.Any(cv.time, _TIME_TRIGGER_ENTITY)
private

Definition at line 41 of file time.py.

◆ _TIME_TRIGGER_ENTITY

homeassistant.components.homeassistant.triggers.time._TIME_TRIGGER_ENTITY = vol.All(str, cv.entity_domain(["input_datetime", "sensor"]))
private

Definition at line 40 of file time.py.

◆ _TIME_TRIGGER_ENTITY_WITH_OFFSET

homeassistant.components.homeassistant.triggers.time._TIME_TRIGGER_ENTITY_WITH_OFFSET
private
Initial value:
1 = vol.Schema(
2  {
3  vol.Required(CONF_ENTITY_ID): cv.entity_domain(["sensor"]),
4  vol.Optional(CONF_OFFSET): cv.time_period,
5  }
6 )

Definition at line 43 of file time.py.

◆ _TIME_TRIGGER_SCHEMA

homeassistant.components.homeassistant.triggers.time._TIME_TRIGGER_SCHEMA
private
Initial value:
1 = vol.Any(
2  cv.time,
3  _TIME_TRIGGER_ENTITY,
4  _TIME_TRIGGER_ENTITY_WITH_OFFSET,
5  valid_at_template,
6  msg=(
7  "Expected HH:MM, HH:MM:SS, an Entity ID with domain 'input_datetime' or "
8  "'sensor', a combination of a timestamp sensor entity and an offset, or Limited Template"
9  ),
10 )

Definition at line 61 of file time.py.

◆ TRIGGER_SCHEMA

homeassistant.components.homeassistant.triggers.time.TRIGGER_SCHEMA
Initial value:
1 = cv.TRIGGER_BASE_SCHEMA.extend(
2  {
3  vol.Required(CONF_PLATFORM): "time",
4  vol.Required(CONF_AT): vol.All(cv.ensure_list, [_TIME_TRIGGER_SCHEMA]),
5  }
6 )

Definition at line 73 of file time.py.