What it exposes
| Feature | Property | Values | Control |
|---|---|---|---|
| Identify | identify | identify | settable |
| On / off | state | — | settable |
| Power failure mode | power_failure_mode | last_state, off, on, blink | settable |
| Reset to factory settings | reset_to_factory_settings | factory_reset, configuration_reset, network_reset | settable |
| Relaunch ble advert | relaunch_ble_advert | relaunch_ble_advert | settable |
| Input mode | input_mode | unknown, push_button, switch, relay, fp_in | settable |
| Contact mode | contact_mode | nc, no | settable |
| Last local command state | last_local_command_state | — | read only |
| Last bp connect state | last_bp_connect_state | — | read only |
| Send press | send_press | SendPress | settable |
| Send release | send_release | SendRelease | settable |
| Select input mode | select_input_mode | unknown, push_button, switch, relay, fp_in | settable |
| Enable short press | enable_short_press | — | settable |
| Enable long press | enable_long_press | — | settable |
| Long press duration | long_press_duration | ms · 0…5000 | settable |
| Time between press | time_between_press | ms · 100…600 | settable |
| Enable R12M long press | enable_R12M_long_press | — | settable |
| Enable local config lock | enable_local_config_lock | — | settable |
| Action (button press) | action | open, close, stop | 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": "OPEN",
"power_failure_mode": "last_state",
"reset_to_factory_settings": "factory_reset",
"relaunch_ble_advert": "relaunch_ble_advert",
"input_mode": "unknown",
"contact_mode": "nc",
"last_local_command_state": false,
"last_bp_connect_state": false,
"send_press": "SendPress",
"send_release": "SendRelease",
"select_input_mode": "unknown",
"enable_short_press": false,
"enable_long_press": false,
"long_press_duration": 2500,
"linkquality": 120
}
Send commands to zigbee2mqtt/my_device/set:
mosquitto_pub -t zigbee2mqtt/my_device/set -m '{"state":"CLOSE"}'
mosquitto_pub -t zigbee2mqtt/my_device/set -m '{"power_failure_mode":"off"}'
mosquitto_pub -t zigbee2mqtt/my_device/set -m '{"reset_to_factory_settings":"configuration_reset"}'
mosquitto_pub -t zigbee2mqtt/my_device/set -m '{"input_mode":"push_button"}'
mosquitto_pub -t zigbee2mqtt/my_device/set -m '{"contact_mode":"no"}'
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: "Open the curtains in the morning"
mode: single
triggers:
- trigger: time
at: "07:30:00"
actions:
- action: cover.open_cover
target:
entity_id: cover.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.