mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-23 17:27:19 +00:00
Moved sunset/sunrise condition descriptions to before examples. (#22580)
This commit is contained in:
parent
12e76c373c
commit
4f01d27575
@ -316,6 +316,7 @@ The sunset/sunrise conditions do not work in locations inside the polar circles,
|
||||
In those cases it is advised to use conditions evaluating the solar elevation instead of the before/after sunset/sunrise conditions.
|
||||
</div>
|
||||
|
||||
This is an example of 1 hour offset after sunset:
|
||||
```yaml
|
||||
condition:
|
||||
condition: sun
|
||||
@ -323,7 +324,7 @@ condition:
|
||||
after_offset: "-01:00:00"
|
||||
```
|
||||
|
||||
This is an example of 1 hour offset after sunset.
|
||||
This is 'when dark' - equivalent to a state condition on `sun.sun` of `below_horizon`:
|
||||
|
||||
```yaml
|
||||
condition:
|
||||
@ -332,7 +333,7 @@ condition:
|
||||
before: sunrise
|
||||
```
|
||||
|
||||
This is 'when dark' - equivalent to a state condition on `sun.sun` of `below_horizon`.
|
||||
This is 'when light' - equivalent to a state condition on `sun.sun` of `above_horizon`:
|
||||
|
||||
```yaml
|
||||
condition:
|
||||
@ -341,8 +342,6 @@ condition:
|
||||
before: sunset
|
||||
```
|
||||
|
||||
This is 'when light' - equivalent to a state condition on `sun.sun` of `above_horizon`.
|
||||
|
||||
We cannot use both keys in this case as it will always be `false`.
|
||||
|
||||
```yaml
|
||||
@ -357,7 +356,7 @@ condition:
|
||||
|
||||
A visual timeline is provided below showing an example of when these conditions are 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 are true.
|
||||
|
||||
<img src='/images/docs/scripts/sun-conditions.svg' alt='Graphic showing an example of sun conditions' />
|
||||

|
||||
|
||||
## Template condition
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user