What it exposes
| Feature | Property | Values | Control |
|---|---|---|---|
| Illuminance | illuminance | lx | read only |
| Motion | occupancy | — | read only |
| Occupancy timeout | pir_o_to_u_delay | s · 15…65535 | settable |
| Zone 1 (0m-1m) | enable_occupancy_zone_1 | — | settable |
| Zone 2 (1m-1.5m) | enable_occupancy_zone_2 | — | settable |
| Zone 3 (1.5m-2m) | enable_occupancy_zone_3 | — | settable |
| Zone 4 (2m-2.5m) | enable_occupancy_zone_4 | — | settable |
| Zone 5 (2.5m-3m) | enable_occupancy_zone_5 | — | settable |
| Zone 6 (3m-3.5m) | enable_occupancy_zone_6 | — | settable |
| Zone 7 (3.5m-4m) | enable_occupancy_zone_7 | — | settable |
| Illuminance calibration | illuminance_calibration | lx · -1000…1000 | settable |
| Fine-tune Sensitivity | radar_sensitivity | -6…6 | settable |
| Spatial learning | spatial_learning | start_learning | settable |
| Spatial learning state | spatial_learning_state | Clear, Learning, Failed | read only |
MQTT: state and commands
Zigbee2MQTT publishes the device state to zigbee2mqtt/my_device (my_device is the name you give the device). An example message:
{
"illuminance": 120,
"occupancy": false,
"pir_o_to_u_delay": 32775,
"enable_occupancy_zone_1": false,
"enable_occupancy_zone_2": false,
"enable_occupancy_zone_3": false,
"enable_occupancy_zone_4": false,
"enable_occupancy_zone_5": false,
"enable_occupancy_zone_6": false,
"enable_occupancy_zone_7": false,
"illuminance_calibration": 0,
"radar_sensitivity": 0,
"spatial_learning": "start_learning",
"spatial_learning_state": "Clear",
"linkquality": 120
}
Send commands to zigbee2mqtt/my_device/set:
mosquitto_pub -t zigbee2mqtt/my_device/set -m '{"enable_occupancy_zone_1":true}'
mosquitto_pub -t zigbee2mqtt/my_device/set -m '{"enable_occupancy_zone_2":true}'
mosquitto_pub -t zigbee2mqtt/my_device/set -m '{"enable_occupancy_zone_3":true}'
mosquitto_pub -t zigbee2mqtt/my_device/set -m '{"enable_occupancy_zone_4":true}'
mosquitto_pub -t zigbee2mqtt/my_device/set -m '{"enable_occupancy_zone_5":true}'
Watch the topics live from the browser: MQTT client.
Home Assistant automation example
Zigbee2MQTT creates Home Assistant entities from the device name. If it is called my_device, an automation in automations.yaml can look like this:
- alias: "Light on motion"
mode: single
triggers:
- trigger: state
entity_id: binary_sensor.my_device_occupancy
to: "on"
conditions:
- condition: sun
after: sunset
actions:
- action: light.turn_on
target:
entity_id: light.hallway
Check the YAML: YAML checker.
How to pair it
- In Zigbee2MQTT click Permit join.
- Put the device in pairing mode: usually a long press of the reset button (5–10 s) until the LED blinks; bulbs: switch the power off and on 5–6 times.
- Keep the device close to the coordinator or a router while pairing.
- Give it a clear name: MQTT topics and Home Assistant entities are built from it.
Exact procedure and model notes: the device page in the Zigbee2MQTT docs. No coordinator yet: coordinator picker.