Expanded example for Condition OR.

It was a little unclear to me if `condition:` AND `condition_type:` were necessary at first glance.  added example.
This commit is contained in:
Carlo Costanzo 2015-10-15 10:44:08 -04:00
parent 7f5f70afee
commit 5345175f95

View File

@ -206,11 +206,15 @@ or off.
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
condition matches.
condition matches. In the example below, the automation would trigger if the time is before 05:00 _OR_ after 20:00.
```yaml
automation:
condition_type: or
- 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.