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:
parent
8226c05682
commit
f97d5189e9
1 changed files with 10 additions and 0 deletions
|
@ -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 |
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue