To contribute to this page, edit the following file

Xiaomi RTCGQ01LM

Vendor Xiaomi
Description MiJia human body movement sensor
Supports occupancy
Picture Xiaomi RTCGQ01LM



Press and hold the reset button on the device for +- 5 seconds (until the blue light starts blinking).

IMPORTANT: Release and start pressing the reset button every second. This keeps the device awake, otherwise pairing will fail!.

NOTE: When you fail to pair a device, try replacing the battery, this could solve the problem.

Device type specific configuration

How to use device type specific configuration

IMPORTANT: occupancy_timeout should not be set to lower than 60 seconds. The reason is this: after detecting a motion the sensor ignores any movements for exactly 60 seconds. In case there are movements after this, a new message (occupancy: true) will be sent and the sensor will go for one more minute sleep, and so on. This is expected behaviour (see #270). To work around this, a hardware modification is needed.

Manual Home Assistant configuration

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

  - platform: "mqtt"
    state_topic: "zigbee2mqtt/<FRIENDLY_NAME>"
    availability_topic: "zigbee2mqtt/bridge/state"
    payload_on: true
    payload_off: false
    value_template: "{{ value_json.occupancy }}"
    device_class: "motion"

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

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