Merge pull request #98 from CCOSTAN/patch-3

Expanded example for Condition OR.
This commit is contained in:
Paulus Schoutsen 2015-10-15 08:27:46 -07:00
commit 296e15684c

View File

@ -206,11 +206,16 @@ or off.
An automation rule can have mulitiple triggers. By default the action will only fire if all conditions An automation rule can have mulitiple triggers. By default the action will only fire if all conditions
pass. An optional key `condition_type: 'or'` can be set on the automation rule to fire action if any pass. An optional key `condition_type: 'or'` can be set on the automation rule to fire action if any
condition matches. condition matches. In the example below, the automation would trigger if the time is before 05:00 _OR_ after 20:00.
```yaml ```yaml
automation: automation:
condition_type: or condition_type: or
condition:
- platform: time
before: '05:00'
- platform: time
after: '20:00'
``` ```
If your triggers and conditions are exactly the same, you can use a shortcut to specify conditions. If your triggers and conditions are exactly the same, you can use a shortcut to specify conditions.