Multi-trigger explanation and example (#2322)

Added instructions on how to use multiple triggers. So far they were mentioned in the introduction but only explained in the huge example configuration on the "Automation Examples" page.
This commit is contained in:
Beat 2017-03-24 15:45:42 +01:00 committed by Fabian Affolter
parent 53566bc4ed
commit 7dea3bd212

View File

@ -148,3 +148,20 @@ automation:
# Event is either enter or leave # Event is either enter or leave
event: enter # or "leave" event: enter # or "leave"
``` ```
### {% linkable_title Multiple triggers %}
When your want your automation rule to have multiple triggers, just prefix the first line of each trigger with a dash (-) and indent the lines following accordingly. Whenever one of the triggers fires, your rule is executed.
```yaml
automation:
trigger:
# first trigger
- platform: time
minutes: 5
seconds: 00
# our second trigger is the sunset
- platform: sun
event: sunset
```