deCONZ - Aqara D1 Wireless Remote Switch (2 Button) - lumi.remote.b286acn02 (WXKG07LM)

My second blueprint, used by myself and immediately for the community.

Button events supported:

  • Left single press
  • Left double press
  • Left hold in
  • Right single press
  • Right double press
  • Right hold in
  • Both buttons single press
  • Both buttons double press
  • Both buttons hold in

Blueprint screenshot (empty example)

Blueprint to import:

blueprint:
  name: deCONZ - Aqara D1 Wireless Remote Switch (2 Button)
  description: "Supported actions: single, double and long press."
  domain: automation
  source_url: https://community.home-assistant.io/t/deconz-aqara-d1-wireless-remote-switch-2-button-lumi-remote-b286acn02-wxkg07lm/274089
  # GUI elements
  input:
    remote:
      name: Remote
      description: Aqara D1 remote to use
      selector:
        device:
          integration: deconz
          manufacturer: LUMI
          model: lumi.remote.b286acn02

    # --- BUTTON ONE ---------------------------------------------------------------
    button_one_single_press:
      name: Left button - Single press
      description: Action on single press button
      default: []
      selector:
        action: {}

    button_one_double_press:
      name: Left button - Double press
      description: Action on double press button
      default: []
      selector:
        action: {}

    button_one_hold_in:
      name: Left button - Long in
      description: Action on long press button
      default: []
      selector:
        action: {}

    # --- BUTTON TWO ---------------------------------------------------------------
    button_two_single_press:
      name: Right button - Single press
      description: Action on single press button
      default: []
      selector:
        action: {}

    button_two_double_press:
      name: Right button - Double press
      description: Action on double press button
      default: []
      selector:
        action: {}

    button_two_hold_in:
      name: Right button - Long in
      description: Action on long press button
      default: []
      selector:
        action: {}

    # --- BOTH BUTTONS ---------------------------------------------------------------
    button_both_single_press:
      name: Both buttons - Single press
      description: Action on single press (BOTH buttons)
      default: []
      selector:
        action: {}

    button_both_double_press:
      name: Both buttons - Double press
      description: Action on double press (BOTH buttons)
      default: []
      selector:
        action: {}

    button_both_hold_in:
      name: Both buttons - Long in
      description: Action on long press (BOTH buttons)
      default: []
      selector:
        action: {}
# End GUI elements

# If press detected before end of action restart script
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:
      # Automation

      # --- BUTTON ONE ---------------------------------------------------------------
      - conditions:
          - "{{ event == 1002 }}"
        sequence: !input "button_one_single_press"
      - conditions:
          - "{{ event == 1004 }}"
        sequence: !input "button_one_double_press"
      - conditions:
          - "{{ event == 1001 }}"
        sequence: !input "button_one_hold_in"

      # --- BUTTON TWO ---------------------------------------------------------------
      - conditions:
          - "{{ event == 2002 }}"
        sequence: !input "button_two_single_press"
      - conditions:
          - "{{ event == 2004 }}"
        sequence: !input "button_two_double_press"
      - conditions:
          - "{{ event == 2001 }}"
        sequence: !input "button_two_hold_in"

      # --- BOTH BUTTONS ---------------------------------------------------------------
      - conditions:
          - "{{ event == 3002 }}"
        sequence: !input "button_both_single_press"
      - conditions:
          - "{{ event == 3004 }}"
        sequence: !input "button_both_double_press"
      - conditions:
          - "{{ event == 3001 }}"
        sequence: !input "button_both_hold_in"

History:

  • 2021-01-28 20:20: First release
  • 2021-01-28 20:30: Blueprint content: added both button events (now 9 button events supported)
  • 2021-01-28 20:40: Blueprint content: fixed both button events bug
  • 2021-01-28 20:40: Added blueprint screenshot (empty example)
  • 2021-01-29 19:30: Blueprint content: minor fix in description text of blueprint
  • 2021-01-30 16:00: Added tags for thread

Hi,

great work!!

Is there any chance to build/create this kind of Blueprint for the 1 Button verison (Aqara Wireless Remote Switch (Single Rocker) (2018 version) too?
Link: https://zigbee.blakadder.com/Xiaomi_WXKG03LM_2018.html

deCONZ - Aqara Wireless Remote Switch (Single Rocker) (2018 version) - lumi.remote.b186acn01 (WXKG03LM Rev.2)

Cheers
Altbau

Shouldn’t take much effort. I can’t test it as I don’t have it available but could provide the blueprint others can test and prove it works.

Needed for creation:

  1. Zigbee ID (done: „lumi.remote.b186acn01“)
  2. Button events supported (done: Single press, double press, Long press)
  3. Button events codes: I could make assumptions OR one could test and sent them to me:
  • Single press: x00x
  • Double press: x00x
  • Long press: x00x

Are you familiar with the event listening @altbau9944? Have a look at deCONZ - Aqara Opple Wireless Scene Switch 2 Button - lumi.remote.b286opcn01 (WXCJKG11LM) and let me know. Otherwise we would need to play some try and error game :slight_smile:

Hi e-raser

here the results of the event listening:

* Single press: x00x

Ereignis 2 ausgelöst 16:50:
{
    "event_type": "deconz_event",
    "data": {
        "id": "wandsender_licht_flur_unten",
        "unique_id": "00:15:8d:00:02:90:61:32",
        "event": 1001,
        "device_id": "631a0a543be61beb8fe8e06c0d6c1520"
    },
    "origin": "LOCAL",
    "time_fired": "2021-01-29T15:50:03.132185+00:00",
    "context": {
        "id": "f8f900cc852a910645b427b0415121c0",
        "parent_id": null,
        "user_id": null
    }
}

* Double press: x00x

Ereignis 1 ausgelöst 16:49:
{
    "event_type": "deconz_event",
    "data": {
        "id": "wandsender_licht_flur_unten",
        "unique_id": "00:15:8d:00:02:90:61:32",
        "event": 1004,
        "device_id": "631a0a543be61beb8fe8e06c0d6c1520"
    },
    "origin": "LOCAL",
    "time_fired": "2021-01-29T15:49:57.513298+00:00",
    "context": {
        "id": "0569123c7d8e0341f38d09059f7feb61",
        "parent_id": null,
        "user_id": null
    }
}

* Long press: x00x

Ereignis 0 ausgelöst 16:49:
{
    "event_type": "deconz_event",
    "data": {
        "id": "wandsender_licht_flur_unten",
        "unique_id": "00:15:8d:00:02:90:61:32",
        "event": 1002,
        "device_id": "631a0a543be61beb8fe8e06c0d6c1520"
    },
    "origin": "LOCAL",
    "time_fired": "2021-01-29T15:49:50.459331+00:00",
    "context": {
        "id": "a1406579b5041fe6ce1f437edee922ce",
        "parent_id": null,
        "user_id": null
    }
 }

Is this what you’re looking for??

Cheers
Altbau

That´s exactly what is needed. Please have a look at

and give it a try. Feel free to give feedback in that topic related to this device so we can keep this one clean for the 2 button version.