Example in sun condition incorrect?

checking back on the sun conditions (need a +1 hour after sunset, and use the below condition)

      - condition: sun
        after: sunset
        after_offset: '01:00:00'

Checking everything, so re-reading, I now am utterly confused. How come this is in the docs:

> condition:
>   condition: sun
>   after: sunset
>   after_offset: "-01:00:00"
> 
> This is ‘when light’ - equivalent to a state condition on  `sun.sun`  of  `above_horizon` .
> 
>
> condition:
>   - condition: sun
>       after: sunrise
>       before: sunset
>
> This is ‘when dark’ - equivalent to a state condition on  `sun.sun`  of  `below_horizon` .

in my country ( :wink: ) it is dark after sunset, and light after sunrise… which is the opposite of the above. What am I misreading here…

Looks like you found a typo :wink:

You can use Edit this page on GitHub at the top of the page to submit a correction to before: sunrise and after: sunset.

That said, unless you live near the equator, I’d always recommend using the sun elevation, rather than a time. The amount of light at one hour after sunset will be very different on the shortest day than the longest day. However, the amount of light at -3 degrees elevation is the same (subject to clouds, solar eclipses, and alien invasions).

1 Like

Haha, Ok, Will do.

Wouldn’t it be simpler to just witch the when dark and when light ?

And yes, will use the elevation for the condition. More to the point for this automation . Thanks!