Skip to content

Latest commit

 

History

History
93 lines (69 loc) · 3.29 KB

WXKG11LM.md

File metadata and controls

93 lines (69 loc) · 3.29 KB
title description
Xiaomi WXKG11LM control via MQTT
Integrate your Xiaomi WXKG11LM via Zigbee2MQTT with whatever smart home infrastructure you are using without the vendors bridge or gateway.

To contribute to this page, edit the following file

Xiaomi WXKG11LM

| Model | WXKG11LM | | Vendor | Xiaomi | | Description | Aqara wireless switch | | Supports | single, double click (and triple, quadruple, hold, release depending on model) | | Picture | Xiaomi WXKG11LM |

Notes

Deprecated click event

By default this device exposes a deprecated click event. It's recommended to use the action event instead.

To disable the click event, set legacy: false for this device in configuration.yaml. Example:

devices:
  '0x12345678':
    friendly_name: my_device
    legacy: false

Pairing

Press and hold the reset button on the device for +- 5 seconds (until the blue light starts blinking). After this the device will automatically join. If this doesn't work, try with a single short button press.

Troubleshooting: device stops sending messages/disconnects from network

Since Xiaomi devices do not fully comply to the Zigbee standard, it sometimes happens that they disconnect from the network. Most of the times this happens because of the following reasons:

  • Device has a weak signal, you can see the signal quality in the published messages as linkquality. A linkquality < 20 is considered weak.
  • Low battery voltage, this can even happen when the battery still appears full. Try a different battery.
  • The device is connected through a router which cannot deal with Xiaomi devices. This is known to happen devices from: Centralite, General Electric, Iris, Ledvance, OSRAM, Sylvania, SmartThings, Securifi.

More detailed information about this can be found here.

Device type specific configuration

How to use device type specific configuration

  • legacy: Set to true to disable the legacy integration (highly recommended!)

Manual Home Assistant configuration

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

{% raw %}

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"
    unit_of_measurement: "%"
    value_template: "{{ value_json.battery }}"
    device_class: "battery"

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

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

{% endraw %}