Same trigger but different actions depending on condition

I don’t know if you ever figured out how to use now() ?
If not, then here is an example!

data_template:
  brightness: >
  {% if ('sun.sun', 'above_horizon') and now().hour >= 10 and now().hour < 18 %}
  255
  {% else %}
  56
  {% endif %} 

This will set the brightness of a given light to 255 between 10:00 and 18:00 and else it will be 56.

Cheers!