deCONZ - Aqara WXKG02LM Smart Light Switch Wireless Double Key

This is a blueprint for the Aqara WXKG02LM (lumi.remote.b286acn01) remote, specifically for use with deCONZ .

Available Actions (9 Actions)

  • Left Button Single Press
  • Left Button Double Press
  • Left Button Long Press
  • Right Button Single Press
  • Right Button Double Press
  • Right Button Long Press
  • Both Buttons Single Press
  • Both Buttons Long Press
  • Both Buttons Double Press

Preview Blueprint Automation GUI

Changelog

  • 2020-12-19: Initial version
  • 2020-12-20: Update 5 another actions (thanks to @Gerben321)

Blueprint


blueprint:
  name: deCONZ - Aqara WXKG02LM Smart Light Switch Wireless Double Key
  description: |
    Control anything using Aqara WXKG02LM Smart Light Switch Wireless Double Key

  domain: automation
  input:
    remote:
      name: Aqara Double Key Switch
      description: Switch to use. Only supports Aqara WXKG02LM Smart Light Switch Wireless Double Key from deCONZ.
      selector:
        device:
          integration: deconz
          manufacturer: LUMI
    left_button_singlepress:
      name: Left Button Single press
      description: Action to run on press on Left Button Single press
      default: []
      selector:
        action:
    left_button_double:
      name: Left Button Double press
      description: Action to run on press on Left Button Double press
      default: []
      selector:
        action:
    left_button_longpress:
      name: Left Button Long press
      description: Action to run on press on Left Button Long press
      default: []
      selector:
        action:
    right_button_singlepress:
      name: Right Button Single press
      description: Action to run on press on Right Button Single press
      default: []
      selector:
        action:
    right_button_double:
      name: Right Button Double press
      description: Action to run on press on Right Button Double press
      default: []
      selector:
        action:
    right_button_longpress:
      name: Right Button Long press
      description: Action to run on press on Right Button Long press
      default: []
      selector:
        action:
    both_buttons_singlepress:
      name: Both Buttons Single press
      description: Action to run on press on Both Buttons Single press
      default: []
      selector:
        action:
    both_buttons_longpress:
      name: Both Buttons Long press
      description: Action to run on press on Both Buttons Long press
      default: []
      selector:
        action:
    both_buttons_double:
      name: Both Buttons Double press
      description: Action to run on press on Both Buttons Double press
      default: []
      selector:
        action:

mode: restart
max_exceeded: silent

trigger:
  - platform: event
    event_type: deconz_event
    event_data:
      device_id: !input "remote"

action:
  - variables:
      event: "{{ trigger.event.data.event }}"
  - choose:
      - conditions:
          - "{{ event == 1002 }}"
        sequence: !input left_button_singlepress
      - conditions:
          - "{{ event == 1004 }}"
        sequence: !input left_button_double
      - conditions:
          - "{{ event == 1001 }}"
        sequence: !input left_button_longpress
      - conditions:
          - "{{ event == 1004 }}"
        sequence: !input left_button_double
      - conditions:
          - "{{ event == 2002 }}"
        sequence: !input right_button_singlepress
      - conditions:
          - "{{ event == 2004 }}"
        sequence: !input right_button_double
      - conditions:
          - "{{ event == 2001 }}"
        sequence: !input right_button_longpress
      - conditions:
          - "{{ event == 3002 }}"
        sequence: !input both_buttons_singlepress
      - conditions:
          - "{{ event == 3001 }}"
        sequence: !input both_buttons_longpress
      - conditions:
          - "{{ event == 3003 }}"
        sequence: !input both_buttons_double


Link to Blueprint: https://gist.github.com/danielbaercgn/73f027ff7611dd84f646e232c4b6e393

Nice! Would be great if you could also add the actions for long press and when both buttons are pressed together. That would add another 3 actions. :smiley:

1 Like

Nice! Would be great if you could also add the actions for long press and when both buttons are pressed together. That would add another 3 actions. :smiley:

Thanks for your feedback.I didn’t even know about these features. Will work on your feedback very soon. :star_struck:

I have added five more actions to the blueprint! :love_you_gesture:

Epic. I’ll install it right now. Always used Node-RED for my buttons because it was a hell to all add them in Hass, but Blueprints really is a gamechanger :D. Thanks again.

1 Like

Have fun @Gerben321! I also moved from Node Red to my Automation for Switches.

Daniel this is really useful, do you know of something for the wall version?

see my gists for QBKG11LM and QBKG12LM, together with an improvement for WXKG02LM
https://gist.github.com/mbaluda

Haven’t you got Both Buttons Long press and Both Buttons Double press the wrong way round on the Blueprint as what automation I have on Double Press does not work but works if I keep Both Buttons Long press blank and do a double button long press?

Thanks for a great Blueprint