What it exposes
| Feature | Property | Values | Control |
|---|---|---|---|
| On / off (1) | state_1 | — | settable |
| After power loss (1) | power_on_behavior_1 | off, on, toggle, previous | settable |
| Power (1) | power_1 | W | read only |
| Voltage (1) | voltage_1 | V | read only |
| AC frequency (1) | ac_frequency_1 | Hz | read only |
| Power factor (1) | power_factor_1 | — | read only |
| Current (1) | current_1 | A | read only |
| Energy (1) | energy_1 | kWh | read only |
| On / off (2) | state_2 | — | settable |
| After power loss (2) | power_on_behavior_2 | off, on, toggle, previous | settable |
| Power (2) | power_2 | W | read only |
| Voltage (2) | voltage_2 | V | read only |
| AC frequency (2) | ac_frequency_2 | Hz | read only |
| Power factor (2) | power_factor_2 | — | read only |
| Current (2) | current_2 | A | read only |
| Energy (2) | energy_2 | kWh | read only |
| Reset total energy (1) | reset_total_energy_1 | Reset | settable |
| Metering only mode (1) | metering_only_mode_1 | — | settable |
| Countdown time on to off (1) | countdown_time_on_to_off_1 | s · 0…60000 | settable |
| Countdown time off to on (1) | countdown_time_off_to_on_1 | s · 0…60000 | settable |
| Reset total energy (2) | reset_total_energy_2 | Reset | settable |
| Metering only mode (2) | metering_only_mode_2 | — | settable |
| Countdown time on to off (2) | countdown_time_on_to_off_2 | s · 0…60000 | settable |
| Countdown time off to on (2) | countdown_time_off_to_on_2 | s · 0…60000 | settable |
| Red led brightness | red_led_brightness | % · 0…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:
{
"state_1": "ON",
"power_on_behavior_1": "off",
"power_1": 12.4,
"voltage_1": 230,
"ac_frequency_1": 0,
"power_factor_1": 0,
"current_1": 0.06,
"energy_1": 3.21,
"state_2": "ON",
"power_on_behavior_2": "off",
"power_2": 12.4,
"voltage_2": 230,
"ac_frequency_2": 0,
"power_factor_2": 0,
"linkquality": 120
}
Send commands to zigbee2mqtt/my_device/set:
mosquitto_pub -t zigbee2mqtt/my_device/set -m '{"state_1":"TOGGLE"}'
mosquitto_pub -t zigbee2mqtt/my_device/set -m '{"state_2":"TOGGLE"}'
mosquitto_pub -t zigbee2mqtt/my_device/set -m '{"power_on_behavior_1":"on"}'
mosquitto_pub -t zigbee2mqtt/my_device/set -m '{"power_on_behavior_2":"on"}'
mosquitto_pub -t zigbee2mqtt/my_device/set -m '{"metering_only_mode_1":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_1
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.