From 7dea3bd21221e1976b9d85d88d35b9ddfc1f3ebb Mon Sep 17 00:00:00 2001 From: Beat Date: Fri, 24 Mar 2017 15:45:42 +0100 Subject: [PATCH] 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. --- source/_docs/automation/trigger.markdown | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/source/_docs/automation/trigger.markdown b/source/_docs/automation/trigger.markdown index 0f5b7355139..fd9d06520ae 100644 --- a/source/_docs/automation/trigger.markdown +++ b/source/_docs/automation/trigger.markdown @@ -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 +```