What it exposes
| Feature | Property | Values | Control |
|---|---|---|---|
| On / off | state | — | settable |
| Default on off state | default_on_off_state | on, off, previous | settable |
| Rms voltage | rms_voltage | V | read only |
| Active power | active_power | W | read only |
| Consumed energy | consumed_energy | Wh | read only |
| Alarm voltage min | alarm_voltage_min | — | settable |
| Alarm voltage max | alarm_voltage_max | — | settable |
| Alarm power max | alarm_power_max | — | settable |
| Alarm consumed energy | alarm_consumed_energy | — | settable |
| Voltage min | voltage_min | 0…253 | settable |
| Voltage max | voltage_max | 0…253 | settable |
| Power max | power_max | 0…65534 | settable |
| Consumed energy limit | consumed_energy_limit | 0…65534 | settable |
| Rssi | rssi | dB · -128…127 | 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:
{
"state": "ON",
"default_on_off_state": "on",
"rms_voltage": 0,
"active_power": 0,
"consumed_energy": 0,
"alarm_voltage_min": false,
"alarm_voltage_max": false,
"alarm_power_max": false,
"alarm_consumed_energy": false,
"voltage_min": 127,
"voltage_max": 127,
"power_max": 32767,
"consumed_energy_limit": 32767,
"rssi": 0,
"linkquality": 120
}
Send commands to zigbee2mqtt/my_device/set:
mosquitto_pub -t zigbee2mqtt/my_device/set -m '{"state":"TOGGLE"}'
mosquitto_pub -t zigbee2mqtt/my_device/set -m '{"default_on_off_state":"off"}'
mosquitto_pub -t zigbee2mqtt/my_device/set -m '{"alarm_voltage_min":true}'
mosquitto_pub -t zigbee2mqtt/my_device/set -m '{"alarm_voltage_max":true}'
mosquitto_pub -t zigbee2mqtt/my_device/set -m '{"alarm_power_max":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: "Off at night"
mode: single
triggers:
- trigger: time
at: "23:30:00"
actions:
- action: switch.turn_off
target:
entity_id: switch.my_device
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.