Zigbee2MQTTZigbee2MQTT
  • Getting started
  • Supported Adapters
  • Supported Devices
  • Installation
  • Configuration
  • Usage
  • FAQ
Devices
  • Zigbee

    • Zigbee network
    • Improve network range and stability
    • Secure your Zigbee network
    • Sniff Zigbee traffic
    • Create a CC2530 router
  • Support new devices

    • Support new devices
    • Support new Tuya devices
    • Find Tuya Data Points
  • Remote Adapter

    • Connect to a remote adapter
    • Connect to a remote Sonoff ZBBridge
  • More

    • 3D cases
    • External converters
    • External extensions
    • Switch to the dev branch
    • Get Tuya and Xiaomi OTA url
  • Forum
  • Discord
  • Issues
  • Donate
GitHub
GitHub (docs)
  • Getting started
  • Supported Adapters
  • Supported Devices
  • Installation
  • Configuration
  • Usage
  • FAQ
Devices
  • Zigbee

    • Zigbee network
    • Improve network range and stability
    • Secure your Zigbee network
    • Sniff Zigbee traffic
    • Create a CC2530 router
  • Support new devices

    • Support new devices
    • Support new Tuya devices
    • Find Tuya Data Points
  • Remote Adapter

    • Connect to a remote adapter
    • Connect to a remote Sonoff ZBBridge
  • More

    • 3D cases
    • External converters
    • External extensions
    • Switch to the dev branch
    • Get Tuya and Xiaomi OTA url
  • Forum
  • Discord
  • Issues
  • Donate
GitHub
GitHub (docs)

Tuya ZG-204ZM

ModelZG-204ZM
VendorTuya
DescriptionPIR 24Ghz human presence sensor
Exposespresence, motion_state, illuminance, battery, fading_time, static_detection_distance, static_detection_sensitivity, indicator, motion_detection_mode, motion_detection_sensitivity
PictureTuya ZG-204ZM

Notes

The manufacturer provides a good technical in-depth document that explains what the various settings mean, good default values for those, a recommended method for trimming these values and various other considerations (like installation position) to get good results.

Options

How to use device type specific configuration

  • illuminance_calibration: Calibrates the illuminance value (percentual offset), takes into effect on next report of device. The value must be a number.

Exposes

Presence (binary)

Indicates whether the device detected presence. Value can be found in the published state on the presence property. It's not possible to read (/get) or write (/set) this value. If value equals true presence is ON, if false OFF.

Motion state (enum)

Motion state. Value can be found in the published state on the motion_state property. It's not possible to read (/get) or write (/set) this value. The possible values are: none, large, small, static.

Illuminance (numeric)

Measured illuminance. Value can be found in the published state on the illuminance property. It's not possible to read (/get) or write (/set) this value. The unit of this value is lx.

Battery (numeric)

Remaining battery in %, can take up to 24 hours before reported. Value can be found in the published state on the battery property. It's not possible to read (/get) or write (/set) this value. The minimal value is 0 and the maximum value is 100. The unit of this value is %.

Fading time (numeric)

Presence keep time. Value can be found in the published state on the fading_time property. It's not possible to read (/get) this value. To write (/set) a value publish a message to topic zigbee2mqtt/FRIENDLY_NAME/set with payload {"fading_time": NEW_VALUE}. The minimal value is 0 and the maximum value is 28800. The unit of this value is s.

Static detection distance (numeric)

Static detection distance. Value can be found in the published state on the static_detection_distance property. It's not possible to read (/get) this value. To write (/set) a value publish a message to topic zigbee2mqtt/FRIENDLY_NAME/set with payload {"static_detection_distance": NEW_VALUE}. The minimal value is 0 and the maximum value is 10. The unit of this value is m.

Static detection sensitivity (numeric)

Static detection sensitivity. Value can be found in the published state on the static_detection_sensitivity property. It's not possible to read (/get) this value. To write (/set) a value publish a message to topic zigbee2mqtt/FRIENDLY_NAME/set with payload {"static_detection_sensitivity": NEW_VALUE}. The minimal value is 0 and the maximum value is 10. The unit of this value is x.

Indicator (binary)

LED indicator mode. Value can be found in the published state on the indicator property. It's not possible to read (/get) this value. To write (/set) a value publish a message to topic zigbee2mqtt/FRIENDLY_NAME/set with payload {"indicator": NEW_VALUE}. If value equals ON indicator is ON, if OFF OFF.

Motion detection mode (enum)

Motion detection mode (Firmware version>=0122052017). Value can be found in the published state on the motion_detection_mode property. It's not possible to read (/get) this value. To write (/set) a value publish a message to topic zigbee2mqtt/FRIENDLY_NAME/set with payload {"motion_detection_mode": NEW_VALUE}. The possible values are: only_pir, pir_and_radar, only_radar.

Motion detection sensitivity (numeric)

Motion detection sensitivity (Firmware version>=0122052017). Value can be found in the published state on the motion_detection_sensitivity property. It's not possible to read (/get) this value. To write (/set) a value publish a message to topic zigbee2mqtt/FRIENDLY_NAME/set with payload {"motion_detection_sensitivity": NEW_VALUE}. The minimal value is 0 and the maximum value is 10. The unit of this value is x.

Help to make the docu better and edit this page on Github ✌
Last Updated:: 6/19/25, 5:56 PM