mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-23 01:06:52 +00:00
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
@ -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…
x
Reference in New Issue
Block a user