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

Functions

CALLBACK_TYPE async_attach_trigger (HomeAssistant hass, ConfigType config, TriggerActionType action, TriggerInfo trigger_info)
 
list[str] has_no_punctuation (list[str] value)
 
list[str] has_one_non_empty_item (list[str] value)
 

Variables

 TRIGGER_SCHEMA
 

Detailed Description

Offer sentence based automation rules.

Function Documentation

◆ async_attach_trigger()

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

Definition at line 52 of file trigger.py.

◆ has_no_punctuation()

list[str] homeassistant.components.conversation.trigger.has_no_punctuation ( list[str]  value)
Validate result does not contain punctuation.

Definition at line 21 of file trigger.py.

◆ has_one_non_empty_item()

list[str] homeassistant.components.conversation.trigger.has_one_non_empty_item ( list[str]  value)
Validate result has at least one item.

Definition at line 30 of file trigger.py.

Variable Documentation

◆ TRIGGER_SCHEMA

homeassistant.components.conversation.trigger.TRIGGER_SCHEMA
Initial value:
1 = cv.TRIGGER_BASE_SCHEMA.extend(
2  {
3  vol.Required(CONF_PLATFORM): DOMAIN,
4  vol.Required(CONF_COMMAND): vol.All(
5  cv.ensure_list, [cv.string], has_one_non_empty_item, has_no_punctuation
6  ),
7  }
8 )

Definition at line 42 of file trigger.py.