ZHA - Aqara Wireless Mini Switch

Thanks! This worked perfectly for me.

I set a single click of the button to toggle my lights, did not set the double or hold… Sometimes I notice it turns the lights on/off very fast with the single click… Is there something I’m doing wrong or something to add to the automation to avoid it firing off the switch toggle multiple times instead of just once?

Anyone have success adding model lumi.remote.b1acn01 with this?

I had already linked my button to home assistant but wasn’t sure how to get it up and running.
Found your page from google, and had my new button up and working in a couple of minutes! Thank you very much!

Mine is listed as lumi.remote.b1acn01 and works well.

Under device info, it shows this as well.

Quirk: zhaquirks.xiaomi.aqara.sensor_switch_aq3.SwitchAQ3B

May want to see if yours is showing the same.

Hey, i added this blueprint, but i cant choose any of my switches! all of them aqara mini switch added via zigbee2mqtt. what is the problem?

1 Like

Thank you so much for this Blueprint! Took my battery reporter and made it a functional smart switch.

dove trovo l’id del dispositivo?

Dove trovo il device_id?

Developer Tools > Events tab > Listen to Events > enter “zha_events” > Start Listening

Immediately, after you start listening, single press the button, then double tap, then press and hold for like five seconds. You can repeat that a couple times if you’d like, but don’t wait long or drastically increases the amount of data captured, which could be very busy.

Press Stop Listening. Review the events captured and locate the device_id for the single, double, hold, and release commands. They should all be the same device.

Hope this helps!

1 Like

I am experiencing the same problem. Under devices it shows

lumi.remote.b1acn01 
by unk_manufacturer

I tried listening to the zha_event and get nothing when I press the button.

I think I stopped the add process too soon. I removed it using zha.remove service call from Developer tools and then re-added it. I had to keep pressing the reset button every 2-3 second during the setup to keep the button awake until it was successfully added (found that trick here ZHA can not remove device - #6 by mrakar)

Does anyone have a suggestion on how to configure “press - longpress” action? I’d like to use the mini switch to:

  • single press: toggle the lights on/off
  • double press: (not configured yet)
  • long press: increase light level by 2% every 100ms (slow fade on)
  • press immediately followed by a long press: decrease light level by 2% every 100ms (slow fade off)
  • release long press: stop fading

Alternatively, how do you use the mini switch to control dimmable lights? Thanks!

I have ZHA installed but getting this error when I try to save the automation Message malformed: Integration ‘’ not found

Any ideas?

My issue seemed to be because was trying to use a Shelly device as one of the actions, once I deleted that one it saved.

Now to see why that didn’t work.

i have 3 lumi.remote.b1acn01. I config them via bluepink. Bluepink detected 3 button but its ok for first button. second button and thirth button can not config.

I created bluepink on button number 1 and it ran very well. But when creating bluepink for button number 2, they don’t run. Press button button number 1, they run both automations

I just got my Aqara Wireless Mini Switch T1, and it is model lumi.remote.b1acn02, not lumi.remote.b1acn01. I tried editing the blueprint, replacing the model with lumi.remote.b1acn02, but it does not work. It won’t register button clicks. Any advice?

I created this separate thread with more details: Issue with Aqara Wireless Mini Switch T1

Apparently these have a model # somewhere. Check out this thread to see if it applies to the one that you have.
wxkg11lm

Does anyone have an experience with using WXKG12LM model? It shows up as “sensor_switch.aq3” and is exposing only battery & switch in sensors. Would appreciate if anyone could guide on how to get single press, double press, and so on other entities available for this specific model of Aqara Wireless Mini Switch.

image

Have also tried following blue print but it doesn’t help either.

blueprint:
  name: ZHA - Aqara Wireless Mini Switch
  description: Automate your Xiaomi Aqara Wireless Mini Switch using ZHA events.
  domain: automation
  input:
    aqara_mini_switch:
      name: Aqara Wireless Mini Switch
      description: Aqara Wireless Mini Switch to use
      selector:
        device:
          integration: zha
          manufacturer: LUMI
          model: lumi.sensor_switch.aq3
          multiple: false
    button_single_press:
      name: Single Press
      description: Action to run on single press
      default: []
      selector:
        action: {}
    button_double_press:
      name: Double Press
      description: Action to run on double press
      default: []
      selector:
        action: {}
    button_long_press:
      name: Long Press
      description: Action to run when button is long pressed (held down)
      default: []
      selector:
        action: {}
    button_released:
      name: Released
      description: Action to run when button is released after a long press
      default: []
      selector:
        action: {}
    button_shaken:
      name: Shake
      description: Action to run when shaken
      default: []
      selector:
        action: {}
  source_url: https://gist.github.com/wwohl/becda6f749423bc3f06b4fcdc0ad6556
mode: restart
max_exceeded: silent
trigger:
- platform: event
  event_type: zha_event
  event_data:
    device_id: !input aqara_mini_switch
action:
- variables:
    command: '{{ trigger.event.data.command }}'
- choose:
  - conditions:
    - '{{ command == ''single'' }}'
    sequence: !input button_single_press
  - conditions:
    - '{{ command == ''double'' }}'
    sequence: !input button_double_press
  - conditions:
    - '{{ command == ''hold'' }}'
    sequence: !input button_long_press
  - conditions:
    - '{{ command == ''release'' }}'
    sequence: !input button_released
  - conditions:
    - '{{ command == ''shake'' }}'
    sequence: !input button_shaken