Reliability of automations. Simple daily automation triggers on random days.
I'm having trouble getting simple automations to work reliable.
Example:
I want to switch on and off my outside lamps (two KNX devices) using the Sun variables.
I have tried using "Sun.Day" without success and now I'm trying the Sun.NotDay variable.
Here is my program task:

Here is the current values of the Sun:

And here you see my lights are currently still on: (!)

Why?
I have made a button in my visu to run the program and when I push it the lights turn on/off instantly. So for some reason it does not trigger correctly.
Suggestions?
Thanks. I have tried to use the If/else previously with no better luck. The program runs great when I trigger it manually so there is something with the triggering. I will try a reboot (again).