What it exposes
| Feature | Property | Values | Control |
|---|---|---|---|
| Last boot | last_boot | — | read only |
| Wifi | wifi | — | settable |
| Ip address | ip_address | — | read only |
| Temperature | temperature | °C | read only |
| Humidity | humidity | % | read only |
| Pressure | pressure | hPa | read only |
| CO₂ | co2 | ppm | read only |
| Illuminance | illuminance | lx | read only |
| Light | state, brightness | on / off, brightness | settable |
| Identify | identify | identify | settable |
| Read interval | read_interval | seconds · 5…600 | settable |
| Night mode | night_mode | — | settable |
| Night on time | night_on_time | Hr · 0…23 | settable |
| Night off time | night_off_time | Hr · 0…23 | settable |
| Co2 control | co2_control | — | settable |
| Co2 invert | co2_invert | — | settable |
| Co2 level high | co2_level_high | ppm · 400…2000 | settable |
| Co2 level low | co2_level_low | ppm · 400…2000 | settable |
| Co2 auto calibration | co2_auto_calibration | — | settable |
| Co2 forced recalibration | co2_forced_recalibration | ppm · 0…5000 | settable |
| Co2 factory reset | co2_factory_reset | — | settable |
| Lux control | lux_control | — | settable |
| Lux invert | lux_invert | — | settable |
| Lux level high | lux_level_high | lx · 100…10000 | settable |
| Lux level low | lux_level_low | lx · 100…10000 | settable |
| Offset illuminance | offset_illuminance | lx · -500…500 | settable |
| Temperature sensor | temperature_sensor | CPU, SCD4X, BMP280 | settable |
| Offset temperature | offset_temperature | °C · -50…50 | settable |
| Offset humidity | offset_humidity | % · -50…50 | settable |
| Offset pressure | offset_pressure | kPa · -100…100 | settable |
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:
{
"wifi": false,
"temperature": 21.6,
"humidity": 46.2,
"pressure": 1012,
"co2": 640,
"illuminance": 120,
"state": "ON",
"brightness": 180,
"read_interval": 303,
"night_mode": false,
"night_on_time": 12,
"night_off_time": 12,
"co2_control": false,
"co2_invert": false,
"linkquality": 120
}
Send commands to zigbee2mqtt/my_device/set:
mosquitto_pub -t zigbee2mqtt/my_device/set -m '{"state":"ON","brightness":180}'
mosquitto_pub -t zigbee2mqtt/my_device/set -m '{"state":"OFF","transition":2}'
mosquitto_pub -t zigbee2mqtt/my_device/set -m '{"wifi":true}'
mosquitto_pub -t zigbee2mqtt/my_device/set -m '{"night_mode":true}'
mosquitto_pub -t zigbee2mqtt/my_device/set -m '{"co2_control":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 at sunset"
mode: single
triggers:
- trigger: sun
event: sunset
offset: "-00:15:00"
actions:
- action: light.turn_on
target:
entity_id: light.my_device
data:
brightness_pct: 70
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.