mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-11 19:36:50 +00:00
Document sentence triggers (#27929)
* Document sentence triggers * Clean up sentence trigger docs
This commit is contained in:
parent
cca3c787df
commit
f201c6b473
@ -24,6 +24,7 @@ An automation can be triggered by an event, a certain entity state, at a given t
|
|||||||
- [Geolocation trigger](#geolocation-trigger)
|
- [Geolocation trigger](#geolocation-trigger)
|
||||||
- [Device triggers](#device-triggers)
|
- [Device triggers](#device-triggers)
|
||||||
- [Calendar trigger](#calendar-trigger)
|
- [Calendar trigger](#calendar-trigger)
|
||||||
|
- [Sentence trigger](#sentence-trigger)
|
||||||
- [Multiple triggers](#multiple-triggers)
|
- [Multiple triggers](#multiple-triggers)
|
||||||
- [Multiple Entity IDs for the same Trigger](#multiple-entity-ids-for-the-same-trigger)
|
- [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
|
See the [Calendar](/integrations/calendar/) integration for more details on event triggers and the
|
||||||
additional event data available for use by an automation.
|
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
|
## 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.
|
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.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user