I did consider this but I omitted that I have a ‘offset’ and I know I can check ‘trigger.offset’ but then if I change the ‘offset’ i’d have to also change the {% if trigger.offset==‘nn’ %} decision. Also since some offsets can be -ve then checking ‘trigger.event’ might work because the sunrise/sunset event hasn’t happened yet.
The way I did this was to set an input boolean with an automation. When it’s ‘after dusk’ (sunset - offset) the boolean is on, when it’s ‘after dawn’ (sunrise + offset) the boolean is off.
Then I use the status of the boolean in my templates.