To contribute to this page, edit the following file

Xiaomi QBKG04LM

Model QBKG04LM
Vendor Xiaomi
Description Aqara single key wired wall switch without neutral wire. Doesn’t work as a router and doesn’t support power meter
Supports release/hold, on/off
Picture ../images/devices/QBKG04LM.jpg

Notes

Pairing

Press and hold the button on the device for +- 10 seconds (until the blue light starts blinking and stops blinking), release and wait.

Manual Home Assistant configuration

Although Home Assistant integration through MQTT discovery is preferred, manual integration is possbile with the following configuration:

QBKG04LM

switch:
  - platform: "mqtt"
    state_topic: "zigbee2mqtt/<FRIENDLY_NAME>"
    availability_topic: "zigbee2mqtt/bridge/state"
    payload_off: "OFF"
    payload_on: "ON"
    value_template: "{{ value_json.state }}"
    command_topic: "zigbee2mqtt/<FRIENDLY_NAME>/set"

sensor:
  - platform: "mqtt"
    state_topic: "zigbee2mqtt/<FRIENDLY_NAME>"
    availability_topic: "zigbee2mqtt/bridge/state"
    icon: "mdi:toggle-switch"
    value_template: "{{ value_json.click }}"

sensor:
  - platform: "mqtt"
    state_topic: "zigbee2mqtt/<FRIENDLY_NAME>"
    availability_topic: "zigbee2mqtt/bridge/state"
    icon: "mdi:gesture-double-tap"
    value_template: "{{ value_json.action }}"

sensor:
  - platform: "mqtt"
    state_topic: "zigbee2mqtt/<FRIENDLY_NAME>"
    availability_topic: "zigbee2mqtt/bridge/state"
    unit_of_measurement: "-"
    value_template: "{{ value_json.linkquality }}"