What it exposes
| Feature | Property | Values | Control |
|---|---|---|---|
| On / off | state | — | settable |
| After power loss | power_on_behavior | off, on, toggle, previous | settable |
| Inching control set | inching_control_set | — | read only |
| Network indicator | network_indicator | — | settable |
| Power | power | W | read only |
| Current | current | A | read only |
| Voltage | voltage | V | read only |
| Energy today | energy_today | kWh | read only |
| Export energy today | output_energy_today | kWh | read only |
| Energy this month | energy_month | kWh | read only |
| Export energy this month | output_energy_month | kWh | read only |
| Energy yesterday | energy_yesterday | kWh | read only |
| Total energy | total_energy | kWh | read only |
| Total export energy | total_output_energy | kWh | read only |
| Outlet control protect | outlet_control_protect | — | settable |
| Ac current max overload enable | ac_current_max_overload_enable | — | settable |
| Ac current max overload | ac_current_max_overload | A · 0.1…32 | settable |
| Ac voltage max overload enable | ac_voltage_max_overload_enable | — | settable |
| Ac voltage max overload | ac_voltage_max_overload | V · 85…277 | settable |
| Ac power max overload enable | ac_power_max_overload_enable | — | settable |
| Ac power max overload | ac_power_max_overload | W · 10…7680 | settable |
| Consumption records | consumption_records | — | read only |
| Consumption records dst | consumption_records_dst | — | read only |
| Read consumption records | read_consumption_records | — | read only |
| Read electricity records | read_electricity_records | — | read only |
| Read all electricity records | read_all_electricity_records | — | read only |
| Electricity records | electricity_records | — | read only |
| All electricity records | all_electricity_records | — | read only |
| Clear history | clear_history | clear | 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:
{
"state": "ON",
"power_on_behavior": "off",
"network_indicator": false,
"power": 12.4,
"current": 0.06,
"voltage": 230,
"energy_today": 0,
"output_energy_today": 0,
"energy_month": 0,
"output_energy_month": 0,
"energy_yesterday": 0,
"total_energy": 0,
"total_output_energy": 0,
"outlet_control_protect": false,
"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 '{"power_on_behavior":"on"}'
mosquitto_pub -t zigbee2mqtt/my_device/set -m '{"network_indicator":true}'
mosquitto_pub -t zigbee2mqtt/my_device/set -m '{"outlet_control_protect":true}'
mosquitto_pub -t zigbee2mqtt/my_device/set -m '{"ac_current_max_overload_enable":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: "Turn off when idle"
mode: single
triggers:
- trigger: numeric_state
entity_id: sensor.my_device_power
below: 2
for: "00:15: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.