Z2M - Aqara Opple switch 2 bands

blueprint:
  name: Z2M - Aqara Opple switch 2 bands
  description: 'Control 2 lights with an Aqara Opple switch 2 bands (WXCJKG13LM).
  
  Inspired by the blueprint of @starbuck93 (https://community.home-assistant.io/t/zigbee2mqtt-ikea-five-button-remote/255308)
  
  It works very well with LED strips and Gledopto controllers (GL-C-008-1ID).
    
    Each band controls one light/group.
    
    - left short press (buttons 1, 3): turn off

    
    - left long press (buttons 1, 3): decrese the brightness smoothly until released
    
    - right short press (buttons 2, 4): increse the brightness smoothly until released
    
    - right double press (buttons 1, 3): set the warmest light (500 mired)
    
    - right double press (buttons 2, 4): set the coldest light (153 mired)
    
    
      '
  domain: automation
  input:
    switch:
      name: Aqara switch
      description: Aqara switch to use
      selector:
        entity:
          domain: sensor
    light_1:
      name: Light(s)
      description: The light(s) to control
      selector:
        target:
          entity:
            domain: light
    button_1_triple:
      name: Button 1 - triple click
      description: Action to run on triple click of button 1
      default: []
      selector:
        action: {}
    button_2_triple:
      name: Button 2 - triple click
      description: Action to run on triple click of button 2
      default: []
      selector:
        action: {}
    button_3_triple:
      name: Button 3 - triple click
      description: Action to run on triple click of button 3
      default: []
      selector:
        action: {}
    button_4_triple:
      name: Button 4 - triple click
      description: Action to run on triple click of button 4
      default: []
      selector:
        action: {}
mode: restart
max_exceeded: silent
trigger:
- platform: state
  entity_id: !input 'switch'
  attribute: action
action:
- variables:
    command: '{{ trigger.to_state.state }}'
- choose:
  - conditions:
    - '{{ command == ''button_1_single'' }}'
    sequence:
    - service: light.toggle
      target: !input 'light_1'
      data: {}
  - conditions:
    - '{{ command == ''button_2_single'' }}'
    sequence:
    - service: light.toggle
      data: {}
      target: !input 'light_1'
  - conditions:
    - '{{ command == ''button_1_double'' }}'
    sequence:
    - service: light.turn_on
      target: !input 'light_1'
      data:
        color_temp: '500'
  - conditions:
    - '{{ command == ''button_2_double'' }}'
    sequence:
    - service: light.turn_on
      target: !input 'light_1'
      data:
        color_temp: '153'
  - conditions:
    - '{{ command == ''button_3_hold'' }}'
    sequence:
    - repeat:
        until:
        - condition: state
          entity_id: !input 'switch'
          state: button_3_release
          attribute: action
        sequence:
        - service: light.turn_on
          data:
            brightness_step_pct: -10
          target: !input 'light_1'
        - delay: '1'
  - conditions:
    - '{{ command == ''button_4_hold'' }}'
    sequence:
    - repeat:
        until:
        - condition: state
          entity_id: !input 'switch'
          state: button_4_release
          attribute: action
        sequence:
        - service: light.turn_on
          data:
            brightness_step_pct: 10
          target: !input 'light_1'
        - delay: '1'
  - conditions:
    - '{{ command == ''button_1_triple'' }}'
    sequence: !input 'button_1_triple'
  - conditions:
    - '{{ command == ''button_2_triple'' }}'
    sequence: !input 'button_2_triple'
  - conditions:
    - '{{ command == ''button_3_triple'' }}'
    sequence: !input 'button_3_triple'
  - conditions:
    - '{{ command == ''button_4_triple'' }}'
    sequence: !input 'button_4_triple'

Hi, thanks for this! Pretty nice and easy to set up for a first timer like me.

I’m having an issue thought, the dimming only works one step every time i press and hold the button. No matter how long i hold, it only dims one step. Any ideas on this? The devices I’m controlling are IKEA LED1836G9 bulbs if that matters.

Thanks!