Skip to content

Commit 7dea3bd

Browse files
bdurrerfabaff
authored andcommitted
Multi-trigger explanation and example (home-assistant#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.
1 parent 53566bc commit 7dea3bd

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

source/_docs/automation/trigger.markdown

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,3 +148,20 @@ automation:
148148
# Event is either enter or leave
149149
event: enter # or "leave"
150150
```
151+
152+
153+
### {% linkable_title Multiple triggers %}
154+
155+
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.
156+
157+
```yaml
158+
automation:
159+
trigger:
160+
# first trigger
161+
- platform: time
162+
minutes: 5
163+
seconds: 00
164+
# our second trigger is the sunset
165+
- platform: sun
166+
event: sunset
167+
```

0 commit comments

Comments
 (0)