What it exposes
| Feature | Property | Values | Control |
|---|---|---|---|
| Presence | presence | — | read only |
| Illuminance | illuminance | lx | read only |
| Illuminance high threshold | illuminance_threshold_high | lx · 0…2000 | settable |
| Illuminance low threshold | illuminance_threshold_low | lx · 0…1000 | settable |
| No-presence delay | presence_timeout | s · 5…3600 | settable |
| Light state | light_switch | — | settable |
| Light linkage | light_linkage | — | settable |
| Illuminance linkage | illuminance_linkage | — | settable |
| Presence breathing indicator | breathing_indicator | — | settable |
| Detection method | detection_method | presence, motion | settable |
| Sensitivity | sensitivity | LL, L, M, H, HH | settable |
| Available program function | program_function | null, no_one_1min, no_one_3min, no_one_5min, no_one_10min, no_one_15min, no_one_30min, no_one_1hour … | read only |
| Installation mode | installation_mode | ceiling, wall | settable |
| Installation height | installation_height | m · 2…3.2 | settable |
| Ceiling detection radius | detection_radius | m · 1…5 | settable |
| Wall detection distance | detection_range | m · 1…8 | settable |
| Environment learning | environment_learning | none, light, medium, deep, disable | settable |
| Manual annotation | manual_annotation | null, no_one_last_1h, no_one_last_2h, no_one_last_4h, no_one_last_8h, no_one_last_12h, no_one_last_24h | settable |
| Sensor power control | sensor_power | on, off, off_10s_restart, off_30s_restart, off_60s_restart, pause_upload, pause_upload_10s, pause_upload_30s … | settable |
| System setting | system_setting | none, identify_start, identify_stop, check_start, check_stop, restore_factory, state_flip_report | settable |
| System information | system_info | — | 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:
{
"presence": false,
"illuminance": 120,
"illuminance_threshold_high": 1000,
"illuminance_threshold_low": 500,
"presence_timeout": 1803,
"light_switch": false,
"light_linkage": false,
"illuminance_linkage": false,
"breathing_indicator": false,
"detection_method": "presence",
"sensitivity": "LL",
"program_function": "null",
"installation_mode": "ceiling",
"installation_height": 3,
"linkquality": 120
}
Send commands to zigbee2mqtt/my_device/set:
mosquitto_pub -t zigbee2mqtt/my_device/set -m '{"light_switch":true}'
mosquitto_pub -t zigbee2mqtt/my_device/set -m '{"light_linkage":true}'
mosquitto_pub -t zigbee2mqtt/my_device/set -m '{"illuminance_linkage":true}'
mosquitto_pub -t zigbee2mqtt/my_device/set -m '{"breathing_indicator":true}'
mosquitto_pub -t zigbee2mqtt/my_device/set -m '{"detection_method":"motion"}'
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_presence
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.