TuYa ZG-204ZL
| Model | ZG-204ZL |
| Vendor | TuYa |
| Description | Luminance motion sensor |
| Exposes | occupancy, illuminance, battery, sensitivity, keep_time, linkquality |
| Picture | ![]() |
Notes
Pairing
To start pairing, press the button (pinhole on the side of the device) using a pin/paperclip for approx. 10 seconds. The led will turn on, then start blinking while the pairing process is in progress.
Reading and Setting Values
As a low power device, the motion sensor isn’t reachable most of the time, but
only when active (e.g. because it detected motion). Therefore, requests to read
or set values (i.e. sensitivity or keep_time) will only work when the sensor detects motion.
Exposes
Occupancy (binary)
Indicates whether the device detected occupancy.
Value can be found in the published state on the occupancy property.
It’s not possible to read (/get) or write (/set) this value.
If value equals true occupancy is ON, if false OFF.
Illuminance (numeric)
Raw 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 %.
Sensitivity (enum)
PIR sensor sensitivity (refresh and update only while active).
Value can be found in the published state on the sensitivity property.
To read (/get) the value publish a message to topic zigbee2mqtt/FRIENDLY_NAME/get with payload {"sensitivity": ""}.
To write (/set) a value publish a message to topic zigbee2mqtt/FRIENDLY_NAME/set with payload {"sensitivity": NEW_VALUE}.
The possible values are: low, medium, high.
Keep_time (enum)
PIR keep time in seconds (refresh and update only while active).
Value can be found in the published state on the keep_time property.
To read (/get) the value publish a message to topic zigbee2mqtt/FRIENDLY_NAME/get with payload {"keep_time": ""}.
To write (/set) a value publish a message to topic zigbee2mqtt/FRIENDLY_NAME/set with payload {"keep_time": NEW_VALUE}.
The possible values are: 10, 30, 60, 120.
Linkquality (numeric)
Link quality (signal strength).
Value can be found in the published state on the linkquality property.
It’s not possible to read (/get) or write (/set) this value.
The minimal value is 0 and the maximum value is 255.
The unit of this value is lqi.
