Aqara QBKG21LM

Happy new year everyone.

I'm just getting started with Hubitat. I started with a Tradfri hub and a xiamoi hub.
I have tradfri bulbs on the tradfri hub and aqara switches on the xiaomi hub.

I thought hubitat would allow me to have google home integration with my aqara switches but I can't get them to work in Hubitat at all.

I've tried some drivers like the oh-lalabs aqara wall switches. I can add my switch but I have no control over it from Hubitat.

Has anyone got any advice for a newbie on how to proceed?

My switches are Aqara no neutral QBKG21LM

First of all, welcome.
Is the switch connected directly to the HE hub?
I used to have one but didn't particularly like it.
It did work connected directly to HE.

Hi, yes connected directly to the HE hub. Do you know which driver you used?

Do you have HPM installed?
If so, go to install. Put in keyword Aqara and this should show up.
Give this driver a try.

I don't have that model of switch, but I have started a universal driver for aqara products that I do have which might work for you:


Thanks for the replies. I tried both drivers and I'm able to add the switch using both.

I just don't seem to get any functionality, maybe I'm doing something wrong?

Once I've added the device I've created a dashboard to test the switch. In the dashboard it just comes up with an unknown and ? symbol.

Interestingly when I delete the device the switch switches off.

I'd appreciate any further help.

I hope this will be helpful. Even though Aqara devices can be made to work when paired directly to Hubitat, my experience and that of many others is that they work better and more consistently when left paired to the Xiaomi gateway.

The good news is that there are several ways to bring devices paired to Xiaomi gateways into Hubitat to use in automations etc.

  1. If you have a Mijia gateway (model DGNWG02LM), then you can use @fison67's Mi Connector app to bring the devices into Hubitat:
    Mi Connector and Xiaomi
  1. Alternatively, the Mijia gateway integrates easily with Node-RED, as does Hubitat, and you can use NR sequences to create Hubitat devices that mirror the state of Xiaomi devices paired to the Mijia gateway. This is the route that I use, and here are the nodes that I use:
    node-red-contrib-xiaomi-smart-devices (node) - Node-RED

  2. If you have a newer Xiaomi (Aqara or Mijia v3) gateway that supports Homekit, you can use Homekit + Homebridge to to create Hubitat devices that mirror the state of Xiaomi devices paired to the gateway.


You need to have the switch do something using the Rule Machine or Simple Automation Rules. You use one of the those and reference the device as a button and then configure the button (single press, double press and/or long press) to trigger something else, e.g. to toggle a light bulb.

As an example, this is a Simple Automation Rule to turn on two lights when the switch is double pressed: