I have this issue with sun events, that used to work.
first of all…
im using Hass.io.
doing the automation In the internal Hass io automation editor.
condition:
- after: sunset
condition: sun
id: '1520308983714'
trigger:
- entity_id: switch.plug_158d000171a301
from: 'on'
platform: state
to: 'off'
If i set this condition “sun” the lights wont even go on… ( when the sun is below the horizon )
When i remove the condition, it does work.
So i am doing something wrong with this condition. and im asking for a nudge in the right direction.
Not sure I’m reading this correctly, but the trigger is what kicks off the automation.
Trigger > validate Condition > perform Action
Sounds like you got it working. Just for sharing here’s a similar one I use based on the elevation of the sun and using a template formula (I also make sure the other lights haven’t already been turned on, and that it is after 3:30 pm. I should probably make a group out of my target lights):