Ikea Trådfri remote automation

I have successfully made automation for my Trådfri remote. This automation really clutters my automations, when I use multiple remotes as I have to make new automation for every trigger.

Can someone help how to include all these triggers in one automation? My code is below:

- id: '1558223144069'
  alias: MQTT IKEA remote livingroom on/off
  trigger:
    - platform: mqtt
      topic: 'zigbee2mqtt/0x000d6ffffe54fd83'
  condition:
    - condition: template
      value_template: "{{ 'toggle' in trigger.payload }}"
  action:
    entity_id: light.0x00124b001ba6f59b_light
    service: light.toggle
#####
- id: '1558263965446'
  alias: MQTT IKEA remote livingroom brightness up
  trigger:
    - platform: mqtt
      topic: 'zigbee2mqtt/0x000d6ffffe54fd83'
  condition:
    - condition: template
      value_template: "{{ 'brightness_up_click' in trigger.payload }}"
  action:
    - service: light.turn_on
      data_template:
        entity_id: light.0x00124b001ba6f59b_light
        transition: '1'
        brightness: >
         {% set n = states.light['0x00124b001ba6f59b_light'].attributes.brightness + 20 %}
         {% if n > 255 %}
           255
         {% else %}
           {{ n }}
         {% endif %}
#####
- id: '1558463165447'
  alias: MQTT IKEA remote livingroom brightness down
  trigger:
    - platform: mqtt
      topic: 'zigbee2mqtt/0x000d6ffffe54fd83'
  condition:
    - condition: template
      value_template: "{{ 'brightness_down_click' in trigger.payload }}"
  action:
    - service: light.turn_on
      data_template:
        entity_id: light.0x00124b001ba6f59b_light
        transition: '1'
        brightness: >
         {% set n = states.light['0x00124b001ba6f59b_light'].attributes.brightness - 20 %}
         {% if n < 10 %}
           10
         {% else %}
           {{ n }}
         {% endif %}
######
- id: '1558263165448'
  alias: MQTT IKEA remote livingroom temperature warm
  trigger:
    - platform: mqtt
      topic: 'zigbee2mqtt/0x000d6ffffe54fd83'
  condition:
    - condition: template
      value_template: "{{ 'arrow_right_click' in trigger.payload }}"
  action:
    - service: light.turn_on
      data_template:
        entity_id: light.0x00124b001ba6f59b_light
        transition: '1'
        color_temp: >
         {% set n = states.light['0x00124b001ba6f59b_light'].attributes.color_temp + 50 %}
         {% if n > 500 %}
           500
         {% else %}
           {{ n }}
         {% endif %}
######
- id: '1558263135449'
  alias: MQTT IKEA remote livingroom temperature cold
  trigger:
    - platform: mqtt
      topic: 'zigbee2mqtt/0x000d6ffffe54fd83'
  condition:
    - condition: template
      value_template: "{{ 'arrow_left_click' in trigger.payload }}"
  action:
    - service: light.turn_on
      data_template:
        entity_id: light.0x00124b001ba6f59b_light
        transition: '1'
        color_temp: >
         {% set n = states.light['0x00124b001ba6f59b_light'].attributes.color_temp - 50 %}
         {% if n < 150 %}
           150
         {% else %}
           {{ n }}
         {% endif %}
#####
- id: '1558263145450'
  alias: MQTT IKEA remote livingroom brightness up hold
  trigger:
    - platform: mqtt
      topic: 'zigbee2mqtt/0x000d6ffffe54fd83'
  condition:
    - condition: template
      value_template: "{{ 'brightness_up_hold' in trigger.payload }}"
  action:
    - service: light.turn_on
      data_template:
        entity_id: light.0x00124b001ba6f59b_light
        transition: '10'
        brightness: >
         {% set n = states.light['0x00124b001ba6f59b_light'].attributes.brightness + 20 %}
         {% if n < 255 %}
           255
         {% else %}
           {{ n }}
         {% endif %}
#####
- id: '1558263155451'
  alias: MQTT IKEA remote livingroom brightness down hold
  trigger:
    - platform: mqtt
      topic: 'zigbee2mqtt/0x000d6ffffe54fd83'
  condition:
    - condition: template
      value_template: "{{ 'brightness_down_hold' in trigger.payload }}"
  action:
    - service: light.turn_on
      data_template:
        entity_id: light.0x00124b001ba6f59b_light
        transition: '10'
        brightness: >
         {% set n = states.light['0x00124b001ba6f59b_light'].attributes.brightness - 20 %}
         {% if n > 1 %}
           1
         {% else %}
           {{ n }}
         {% endif %}

Hi,

I created an app for AppDaemon to bring full functionality to IKEA E1524/E1810 and IKEA E1743. If you have more than one controller you can add a new instance app and that’s it. I don’t support group of lights, just 1 sensor connected with 1 light. However, you can connect them by creating different apps with multiple lights and the same controller in all of them. You can see the post about it here.