diff --git a/source/_docs/automation/trigger.markdown b/source/_docs/automation/trigger.markdown index 802852f9b27..05c1b1d7f1f 100644 --- a/source/_docs/automation/trigger.markdown +++ b/source/_docs/automation/trigger.markdown @@ -24,6 +24,7 @@ An automation can be triggered by an event, a certain entity state, at a given t - [Geolocation trigger](#geolocation-trigger) - [Device triggers](#device-triggers) - [Calendar trigger](#calendar-trigger) +- [Sentence trigger](#sentence-trigger) - [Multiple triggers](#multiple-triggers) - [Multiple Entity IDs for the same Trigger](#multiple-entity-ids-for-the-same-trigger) @@ -892,6 +893,30 @@ automation: See the [Calendar](/integrations/calendar/) integration for more details on event triggers and the additional event data available for use by an automation. +## Sentence trigger + +A sentence trigger fires when [Assist](/voice_control/) matches a sentence from a voice assistant using the default [conversation agent](/integrations/conversation/). + +Sentences are allowed to use some basic [template syntax](https://developers.home-assistant.io/docs/voice/intent-recognition/template-sentence-syntax/#sentence-templates-syntax) like optional and alternative words. For example, `[it's ]party time` will match both "party time" and "it's party time". + +```yaml +automation: + trigger: + - platform: conversation + command: + - "[it's ]party time" + - "happy (new year|birthday)" +``` + +The sentences matched by this trigger will be: + +- party time +- it's party time +- happy new year +- happy birthday + +Punctuation and casing are ignored, so "It's PARTY TIME!!!" will also match. + ## Multiple triggers It is possible to specify multiple triggers for the same rule. To do so just prefix the first line of each trigger with a dash (-) and indent the next lines accordingly. Whenever one of the triggers fires, [processing](#what-are-triggers) of your automation rule begins.