Light on at sunset and off at sunrise (in a single automation)

Very cool. I’ll check this out.

@neliss, how do I choose sunset and sunrise tiggers?

I wrote it in a manual here: GitHub - nielsfaber/scheduler-card: HA Lovelace card for control of scheduler entities

In programming like this we always do things in reverse.
So the first condition should be after SUNSET - because that’s only true once. Then you do after SUNRISE - that way after sunset will match first (after sunset) and be executed, whereas as other people have pointed out - the way you have it once sunrise has happened, it will always match that first - even at sunset.

EDIT: But using the sun elevation is a better way of doing it - because sunset can be already be quite dark in the winter but quite light in the summer.

I have the sun integration but I don’t see the sun moon button.