mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-19 07:17:14 +00:00
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:
parent
53566bc4ed
commit
7dea3bd212
@ -148,3 +148,20 @@ automation:
|
||||
# Event is either 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
|
||||
```
|
||||
|
Loading…
x
Reference in New Issue
Block a user