Provide an example of how to make a 'when dark' condition by ORing sunrise and sunset conditions. (#4652)

See issue#12308 at https://github.com/home-assistant/home-assistant/issues/12308
This commit is contained in:
Bob Igo 2018-02-13 11:10:53 -05:00 committed by Alok Saboo
parent 8226c05682
commit f97d5189e9

View File

@ -114,6 +114,16 @@ condition:
after_offset: "-1:00:00"
```
```yaml
condition:
condition: or # 'when dark' condition: either after sunset or before sunrise
conditions:
- condition: sun
after: sunset
- condition: sun
before: sunrise
```
Here is a truth table to clarify the parameters with and without offset:
| command | night | at sunrise | daytime | at sunset |