Are you aware that this will only turn on at sunset? It will not turn on ANY other time? For some reason, I get the impression that you expect it to turn on anytime between sunset and 11pm.
It also wonāt switch back off at 23:00 either. You will need either another automation to do that or some āfancyā coding to get it done in one automation.
Just to keep it simple I would go the two automation route until you get more experience.
Right. thatās because of the way the trigger in the automation works.
the automation ālistensā for the trigger state to be satisfied then it runs the actions as long as the condition(s) is/are met. the trigger only happens at one instant in time. It doesnāt wait around for the conditions to be true to run the actions. If the conditions arenāt true at the instance the trigger becomes true then the actions wonāt be run.
It really isnāt bad at all once you get a bit of experience, especially if you have experience coding in other languages.