This is the blueprint for the Sonoff Zigbee Wireless Switch (SNZB-01) (Last Updated 12/01/25):
Tested on:
and
and possibly more, however the above are the 1 button devices I have and tested, can’t find the model/name of the round one (probably sold under different brand names but same HW)
Supported actions:
- Single press
- Double press
- Long press (4 seconds)
Get started
Click the badge to import this Blueprint:
Zigbee2MQTT - Sonoff 1-Button Switch (MQTT Device Trigger)
Blueprint moved to github.
The blueprint filename has changed if you used a privious version of this blueprint see here how to avoid having to rewrite your automation manually after switching the blueprint.
Alternate Blueprint
Zigbee2MQTT - Sonoff 1-Button Switch (MQTT Subscribe Any - Filters Multiple Devices)
Here is an alternate blueprint if you want to automate multiple devices (of the same type) in with the same actions maintaining a single automation.
If the buttons are mostly doing the same thing but you want to introuduce minor variation you could do something like this.
Change Log:
12/01/2025
- New blueprint created using MQTT device triggers to avoid triggering unnecessarily the atuomation when any action is fired by mqtt devices.
- Added another generic button which handles long pressed as
hold
orlong
actions. - Added an alternate blueprint that handle multiple buttons allowing control of many buttons within the same automation. (Using the method where the automation triggers for any mqtt device action)
05/01/2025
- Changed blueprint to use MQTT Topic Triggers instead of the HA SNZB-01 device sensor entity which no longer exist.
30/12/2023
- added dropdown to choose Automation Mode type (default is “parallel”), see Automation modes - Home Assistant