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

Functions

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

Variables

dictionary _EVENT_DESCRIPTION = {EVENT_ENTER: "entering", EVENT_LEAVE: "leaving"}
 
 _LOGGER = logging.getLogger(__name__)
 
 _TRIGGER_SCHEMA
 
string DEFAULT_EVENT = EVENT_ENTER
 
string EVENT_ENTER = "enter"
 
string EVENT_LEAVE = "leave"
 

Detailed Description

Offer zone automation rules.

Function Documentation

◆ async_attach_trigger()

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

Definition at line 66 of file trigger.py.

◆ async_validate_trigger_config()

ConfigType homeassistant.components.zone.trigger.async_validate_trigger_config ( HomeAssistant  hass,
ConfigType   config 
)
Validate trigger config.

Definition at line 54 of file trigger.py.

Variable Documentation

◆ _EVENT_DESCRIPTION

dictionary homeassistant.components.zone.trigger._EVENT_DESCRIPTION = {EVENT_ENTER: "entering", EVENT_LEAVE: "leaving"}
private

Definition at line 40 of file trigger.py.

◆ _LOGGER

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

Definition at line 38 of file trigger.py.

◆ _TRIGGER_SCHEMA

homeassistant.components.zone.trigger._TRIGGER_SCHEMA
private
Initial value:
1 = cv.TRIGGER_BASE_SCHEMA.extend(
2  {
3  vol.Required(CONF_PLATFORM): "zone",
4  vol.Required(CONF_ENTITY_ID): cv.entity_ids_or_uuids,
5  vol.Required(CONF_ZONE): cv.entity_id,
6  vol.Required(CONF_EVENT, default=DEFAULT_EVENT): vol.Any(
7  EVENT_ENTER, EVENT_LEAVE
8  ),
9  }
10 )

Definition at line 42 of file trigger.py.

◆ DEFAULT_EVENT

string homeassistant.components.zone.trigger.DEFAULT_EVENT = EVENT_ENTER

Definition at line 36 of file trigger.py.

◆ EVENT_ENTER

string homeassistant.components.zone.trigger.EVENT_ENTER = "enter"

Definition at line 34 of file trigger.py.

◆ EVENT_LEAVE

string homeassistant.components.zone.trigger.EVENT_LEAVE = "leave"

Definition at line 35 of file trigger.py.