I try to automate a light. I should only turned on from dusk till dawn - say if dark.
I try the following code:
condition:
- condition: sun
after: sunset
before: sunrise
action:
- service: light.turn_on
The condition comes from https://www.home-assistant.io/docs/scripts/conditions/#sunsetsunrise-condition
But if i run the automation the light will always turned on.
Where is my fault?