ZHA - Xiaomi Aqara Wireless Mini Switch (WXKG11LM) - lumi.sensor_switch.aq2

Wow, I didn’t know that the previous version (WXKG11LM) had all this button press functionality.

I remember that when researching for it, most of the time I was reading for the single, double and long press abilities and I thought that getting the WXKG12LM was a better deal (with the added shake function).

Seems I was wrong and someone in this post from the HA community was indeed reporting the single, double, triple and quadruple functions (although via zigbee2mqqt but I don’t think that matters). Others of course reported the other functions (single, double and long)

So from what it seems the WXKG11LM button is like a jackpot?

The shake function on the WXKG12LM is nice, but i like my WXKG11LM hehe

But the remotes i like the most are:

  1. The rounded ones (WXKG01LM), which support single/double/triple/quad/multiple/hold;
  2. The WXKG07LM and similar (there are versions with different number of buttons), which support single/double/hold on each button, and even combined (single press on both buttons, double, and hold on both), and they look great, feel great and have great pricing hehe

Hi Carlos,

From what it seems the 1st version of the Xiaomi buttons (WXKG01LM) are the best in terms of functionality. I could try and get the WXKG11LM but it seems that finding the ones that support the triple and quadruple presses is a bit hard.

The Aqara D1 (WXKG07LM) buttons indeed look great, I couldn’t resist and ordered a couple from AliExpress (as cheap as 12 Euros each!) to test them.

Thanks for sharing.

Hello!

Yes, the ones i like the most are the WXKG01LM… i just ordered two more recently :smiley:

Yes, they are crazy cheap for the product! Hope you like them :slight_smile:

Np!

I had to take out model as mine was named differance

my selector

      selector:
        device:
          integration: zha
          manufacturer: LUMI

Is it working? The Blueprint?
Because the way the events are sent might be different!

If it’s working, can you share your model? I can try to change the BP to include both models!

Thanks!

lumi.remote.b1acn01

@myle, there is actually a Blueprint specific to that model, check it out: ZHA - Aqara Wireless Mini Switch

Might be worth pointing out that the model number printed on the switch is identical, even though the internal identification code is different (I have the b1acn01 version, and it’s still labelled as a WXKG11LM on the device)

Yes, correct.
You can check this kind of stuff here: Aqara Wireless Mini Switch WXKG11LM Zigbee compatibility info
Props to @blakadder

Can this work with Matter? Thanks.

Hello All,

I am super new here. I am also super frustrated just trying to get this aqara mini switch to work. I am using the BETA Matter add-on and now a Zigbee dongle, so I am curious if that is why this method isn’t working.

See image:

I also tried to add an event automation, but for some reason, I do not see an event log what I try to listen to events on zha_event. Again, maybe this is just because I am using Matter. I see Dennis also asked the question, but just looking for some help. I’m a total newb, so I’m sure it is something I am just not understanding correctly, or doing correctly. Thanks! :slight_smile:

Hello @square and @bkhalterman,
The device might work with Matter, but this blueprint will only work for the ZHA integration, directly with Zigbee.

Beat regards

1 Like

I’ve got it working with Matter with the Aqara hub doing the Matter support. I have the version of this model that only supports a subset of these functions. This might be because I’m going through the Aqara hub. I’ll try a ZHA hookup later to see if indeed the events reach HA with function beyond the double press.

blueprint:
  name: Matter - Aqara Wireless Mini Switch
  description: Automate your Aqara Wireless Mini Switch when run via Matter (with long/short press differentiation)
  author: EFH52 (enhanced by AI)
  domain: automation
  input:
    target_switch:
      name: Aqara Wireless Mini Switch
      description: Target Aqara Wireless Mini Switch to monitor
      selector:
        entity:
          integration: matter
          domain: event
          device_class: button

    short_press_action:
      name: Short Press Action
      description: Action to take on a short press
      default: []
      selector:
        action: {}

    long_press_action:
      name: Long Press Action
      description: Action to take on a long press
      default: []
      selector:
        action: {}

    double_press_action:
      name: Double Press Action
      description: Action to take on a double press
      default: []
      selector:
        action: {}

    triple_press_action:
      name: Triple Press Action
      description: Action to take on a triple press
      default: []
      selector:
        action: {}

    quadruple_press_action:
      name: Quadruple Press Action
      description: Action to take on a quadruple press
      default: []
      selector:
        action: {}

mode: single
max_exceeded: silent

trigger:
  - platform: state
    entity_id: !input target_switch
    attribute: event_type

action:
  - service: persistent_notification.create
    data:
      title: "Aqara Mini Switch Debug"
      message: "Event triggered:  event_type={{ trigger.to_state.attributes.event_type }}"

  - choose:
      - conditions:
          - condition: template
            value_template: "{{ trigger.to_state.attributes.event_type == 'short_release' }}"
        sequence: !input short_press_action

      - conditions:
          - condition: template
            value_template: "{{ trigger.to_state.attributes.event_type == 'long_press' }}"
        sequence: !input long_press_action

      - conditions:
          - condition: template
            value_template: "{{ trigger.to_state.attributes.event_type == 'multi_press_complete' and trigger.to_state.attributes.totalNumberOfPressesCounted == 2 }}"
        sequence: !input double_press_action

      - conditions:
          - condition: template
            value_template: "{{ trigger.to_state.attributes.event_type == 'multi_press_complete' and trigger.to_state.attributes.totalNumberOfPressesCounted == 3 }}"
        sequence: !input triple_press_action

      - conditions:
          - condition: template
            value_template: "{{ trigger.to_state.attributes.event_type == 'multi_press_complete' and trigger.to_state.attributes.totalNumberOfPressesCounted == 4 }}"
        sequence: !input quadruple_press_action

Not sure if it was a recent HA update or what but this blueprint automation no longer triggers. I can see the button working in events but traces in the in the automation are not acknowledging anything

Same here. This and another button blueprint stopped working. Hope to find a fix soon.

I also noticed that my automations weren’t working, but I found a solution. In the variables trigger.event.data.args.value needs to be changed into trigger.event.data.args.attribute_value, both on line 53 and 56.

An updated complete blueprint also can be found on: ZHA-WXKG11LM-blueprint.yml · GitHub

1 Like

Does anyone know a version of this for zigbee2mqtt? It does not recognize my device in this blueprint and I assume that is why.

EDIT: I went with this which suits my needs just fine. Switch Manager - New refined switch integration to manage your switches

This blueprint broke after upgrading from 2024.9 to 2024.10. For anyone else trying to figure out how to fix it, go into the blueprint and and change line 159

from mode: restart
to mode: queued