Not sure why my automation isn't working

The lights do turn on whenever one motion sensor is triggered.

Now I have to figure out how to rewrite the automation so the lights only turn on 30 min before sunset to 11pm

This condition should not pass since it is easily 1-2 hours before sunset where I am. However the condition is passing.

Confirm sun before sunset offset by -00:30:00

I think it is supposed to be sun after sunset offset?

I’m still trying to make my brain make sense of before/after sun rise/set combined with offset and translating that into if it is 30 min after sunset/sunrise, etc

Maybe stupid question, but did you add the sun integration ?


Go to dev tools, search for sun.sun and see what the next_setting attribute shows.

If it’s wrong, have a look at your location settings, including altitude. That last one is important since it affects calculations for sunrise & sunset