Run a service with many parameter from template

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 %}

You can only template the value of a key: value pair. You have both in your template. For three keys you need three templates.

Thank you for your response.
I thought it would somehow be possible to pack groups of parameters into one template rule.