That works with Channel triggers, you don’t need any Items:
Within MainUI, create an Astro Thing, configure a Channel for sunset with a Range Event, enter an Offset of -60 or whatever time before sunset you want, then trigger in your rules on
As an alternative you may use the sun elevation linked with a switch item with range profile. In my case I use 5 degrees elevation to define night or day.
Thanks to both of you.
I had the basics, what I missed is that we can add on offset to the corresponding “Range Event”.
The first solution works, I waited this evening to test it. @moody_blue your idea sounds nice too, I will compare the results of both solutions.