Add example sun condition which is true during daytime (#7267)

* Add example condition which is true during daytime

* Update conditions.markdown
This commit is contained in:
emontnemery 2018-11-11 11:41:40 +01:00 committed by Franck Nijhof
parent 0e77a21c57
commit ca4f79b04e

View File

@ -139,6 +139,16 @@ condition:
before: sunrise
```
```yaml
condition:
condition: and # 'when light' condition: before sunset and after sunrise
conditions:
- condition: sun
before: sunset
- condition: sun
after: sunrise
```
A visual timeline is provided below showing an example of when these conditions will be true. In this chart, sunrise is at 6:00, and sunset is at 18:00 (6:00 PM). The green areas of the chart indicate when the specified conditions will be true.
<img src='/images/docs/scripts/sun-conditions.svg' alt='Graphic showing an example of sun conditions' />