what is the correct syntax for the following task?
My attempts return an error.
also tried to pack the parameters in one line. All without success.
- service: light.turn_on
data_template: >-
{% if is_state('sun.sun', 'above_horizon') %}
entity_id: light.hue_ambiance_spot_1
transition: 3
brightness: 160
color_temp: 180
{% else %}
entity_id: light.hue_ambiance_spot_1
brightness: 200
color_temp: 100
{% endif %}