The Xiaomi Mi Temperature and Humidity Sensor (model WSDCGQ01LM) is a small round, battery-powered Zigbee sensor for indoor use. It measures ambient temperature and relative humidity and runs on a CR2032 coin cell. Zigbee2MQTT also lists it under the white-label names Xiaomi YTC4042GL, YTC4007CN and YTC4018CN. It is not the square Aqara WSDCGQ11LM, which also measures air pressure.
TapHome communicates with the sensor indirectly. The WSDCGQ01LM pairs with a Zigbee coordinator managed by a Zigbee2MQTT bridge, which publishes the readings as JSON on MQTT topics. TapHome subscribes to these topics through a Packet Parser MQTT module and maps them to one temperature sensor device with humidity, battery and link quality values. Other Zigbee2MQTT sensors, for example the Tuya TS0201 or the Aqara RTCGQ11LM motion sensor, are set up the same way.
Requirements
- Zigbee coordinator — a Zigbee adapter supported by Zigbee2MQTT
- Zigbee2MQTT bridge — running on a host next to the coordinator
- MQTT broker — reachable from both the Zigbee2MQTT host and the TapHome control unit
- TapHome control unit with Packet Parser MQTT support
The sensor itself has no Wi-Fi or Ethernet connection. All IP networking happens between the MQTT broker, Zigbee2MQTT and the TapHome control unit. The template expects the default Zigbee2MQTT base topic zigbee2mqtt.
Pairing with Zigbee2MQTT
The WSDCGQ01LM must be paired with the Zigbee2MQTT coordinator before the template is imported:
- Place the sensor close to the Zigbee coordinator.
- Open the Zigbee2MQTT web UI and enable pairing mode (Permit join).
- Press and hold the reset button for about 5 seconds, until the blue light starts blinking. The reset button is the small button on the top of the device.
- The sensor joins automatically and appears in the Zigbee2MQTT device list with its IEEE address. Optionally assign a friendly name (for example
bedroom_climate) in the device settings.
The battery percentage can take up to 24 hours to appear after pairing — the sensor reports it only periodically.
Placement
The sensor is for indoor use only. It can stand freely at the desired location, or it can be fixed with the adhesive sticker after removing the protective film (an extra sticker is included in the box). The surface must be clean and dry. Do not mount the sensor on a metal surface.
Zigbee2MQTT device options
Zigbee2MQTT offers device-specific options for this sensor. They take effect with the next report from the device:
| Option | Description |
|---|---|
temperature_calibration | Absolute offset added to the temperature value |
temperature_precision | Number of decimal places for temperature (0–3, can only decrease precision) |
humidity_calibration | Absolute offset added to the humidity value |
humidity_precision | Number of decimal places for humidity (0–3, can only decrease precision) |
Configuration
Import parameters
When importing the template, enter the address of the MQTT broker:
| Parameter | Description | Default |
|---|---|---|
Mqtt Broker ipAddress | IP address of the MQTT broker | 192.168.0.1 |
Mqtt Broker port | TCP port of the MQTT broker | 1883 |
The module subscribes to the root topic zigbee2mqtt/#.
Module variable
After the import, set the module variable Xiaomi_WSDCGQ01LM_1 to the identity of the sensor in Zigbee2MQTT:
| Variable | Description | How to obtain | Default in the template |
|---|---|---|---|
Xiaomi_WSDCGQ01LM_1 | Zigbee2MQTT friendly name or IEEE address of the sensor | Zigbee2MQTT web UI → Devices → WSDCGQ01LM → copy the friendly name or IEEE address | 0x00158d0001823a01 |
The default value
0x00158d0001823a01is only an example. Replace it with the friendly name or IEEE address of your sensor, otherwise the template receives no data.
The listener script reacts only to messages on the topic zigbee2mqtt/ followed by the value of this variable, so the value must match the Zigbee2MQTT name exactly. In the TapHome app, the template is added to the MQTT interface with these import parameters, and the variable is then edited in the module settings.
A friendly name (for example
bedroom_climate) is easier to read than the IEEE address. If the friendly name is changed later in Zigbee2MQTT, the variable in TapHome must be updated as well.
Device capabilities
The template creates one device, Xiaomi WSDCGQ01LM, of the temperature sensor type. It is updated from the JSON state message on zigbee2mqtt/{Xiaomi_WSDCGQ01LM_1}.
Temperature and humidity
Temperature in °C is read from the temperature property. Relative humidity is read from the humidity property, which Zigbee2MQTT publishes in percent. The template divides it by 100 because TapHome keeps humidity on a 0–1 scale and displays it as a percentage, so a payload of 54.2 appears as 54.2 % in TapHome.
According to the manufacturer’s manual, the sensor measures:
| Quantity | Range | Accuracy |
|---|---|---|
| Temperature | -20 °C to 50 °C | ±0.3 °C |
| Relative humidity | 10–90 % RH, non-condensing | ±3 % |
Battery and signal monitoring
The device has three service attributes, read from the same JSON message:
- Battery — remaining battery in percent (0–100 %) from the
batteryproperty, shown as for example95% - Battery voltage — battery voltage in millivolts from the
voltageproperty, shown as for example3000mV - Atribút — Zigbee link quality (LQI) from the
linkqualityproperty, shown with the unitlqi; the template displays this attribute under the nameAtribút
Battery and Battery voltage show - until the first message with these values arrives. The link quality attribute starts at 0lqi.
Technical specifications
| Parameter | Value |
|---|---|
| Model | WSDCGQ01LM |
| Wireless connectivity | Zigbee, 2405–2480 MHz |
| Battery | CR2032 |
| Dimensions | 36 × 36 × 11.5 mm |
Troubleshooting
No data in TapHome
- Check that the sensor appears in the Zigbee2MQTT device list with a recent “Last seen” time.
- Check that the
Xiaomi_WSDCGQ01LM_1variable matches the friendly name or IEEE address exactly, and that the example value0x00158d0001823a01was replaced. - Subscribe to
zigbee2mqtt/#with an MQTT client (for example MQTT Explorer) and confirm that JSON messages arrive onzigbee2mqtt/{friendly_name}. - Check that the broker IP address and port in the import parameters are reachable from the TapHome control unit.
Sensor stops sending messages or leaves the network
Xiaomi devices do not fully comply with the Zigbee standard and sometimes disconnect from the network. The most common causes are:
- Weak signal — link quality below 20 is considered weak. Move the sensor closer to the coordinator or to a mains-powered Zigbee router.
- Low battery voltage — this can happen even when the battery still appears full. Try a different CR2032 battery.
- Incompatible router — routers from Centralite, General Electric, Iris, Ledvance, Legrand, OSRAM, Sylvania, Securifi and some other vendors are known to cause problems with Xiaomi devices. Connect the sensor directly to the coordinator by pressing the reset button while it is physically close to the coordinator.
Humidity value in smart rules is between 0 and 1
This is expected. TapHome keeps humidity on a 0–1 scale (0.542 = 54.2 %) and the app displays it in percent. Use the 0–1 value in smart rules and formulas.