Data and service template render errors

Thanks to help from this forum I managed to get the service call to function.
But now I would like to add some data to the call. And whatever I tried, I only ever got “Error rendering data template: Result is not a Dictionary” as a result.

Additionally when an event occurs that I want to ignore, e.g. button up, I get “Template rendered invalid service: {}”

Any help is greatly appreciated.

alias: AAA DECONZ
description: ""
trigger:
  - platform: event
    event_type: deconz_event
condition:
  - condition: template
    value_template: "{{ trigger.event.data.device_id == '40b0175e4f8a454fca785268c10c49b5' }}"
action:
  - service: logbook.log
    data:
      name: Button
      message: "{{ trigger.event.data.event }} on {{ trigger.event.data.id }}"
  - service: >
      {% if   trigger.event.data.event == 1000 %}
        {{ 'light.turn_on' }}
      {% elif trigger.event.data.event == 2000 %}
        {{ 'light.turn_on' }}
      {% elif trigger.event.data.event == 3000 %}
        {{ 'light.turn_on' }}
      {% elif trigger.event.data.event == 4000 %}
        {{ 'light.turn_off' }}
      {% else %}
        {}
      {% endif %}
    data: >
      {
      {% if   trigger.event.data.event == 1000 %}
        {}
      {% elif trigger.event.data.event == 2000 %}
        { "brightness_step_pct" : 10 }
      {% elif trigger.event.data.event == 3000 %}
        {{ 'brightness_step_pct: "-10"' }}
      {% elif trigger.event.data.event == 4000 %}
        {}
      {% else %}
        {}
      {% endif %}
      }
    entity_id: light.color_temperature_light_15
mode: single

Well, looks like you end up in

      {% else %}
        {}

which is obviously not a proper service

There is no service {}… if it is possible to receive events that shouldn’t be acted on, you need to use a condition to filter those out.

alias: AAA DECONZ
description: ""
trigger:
  - platform: event
    event_type: deconz_event
    variables:
      event: "{{ trigger.event.data.event }}"
condition:
  - condition: template
    value_template: "{{ trigger.event.data.device_id == '40b0175e4f8a454fca785268c10c49b5' }}"
action:
  - service: logbook.log
    data:
      name: Button
      message: "{{ event }} on {{ trigger.event.data.id }}"
  - alias: Check if event is in list of actionable values
    condition: template
    value_template: "{{ event in [1000, 2000, 3000, 4000] }}"
  - service: light.turn_{{ 'on' if event in [1000, 2000, 3000] else 'off' }}
    data: >
      {% if event == 2000 %}
        {{ {"brightness_step_pct" : 10} }}
      {% elif event == 3000 %}
        {{ {"brightness_step_pct": -10} }}
      {% else %}
        {{ {} }}
      {% endif %}
    target:
      entity_id: light.color_temperature_light_15
mode: single

Thank you so very much!
A lot more help than I hoped for.