Zigbee2MQTT - 1-Button Wireless Switch (SNZB-01 and more) - rdeangel

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:

  1. Single press
  2. Double press
  3. Long press (4 seconds)

Get started

Click the badge to import this Blueprint:
Zigbee2MQTT - Sonoff 1-Button Switch (MQTT Device Trigger)
Open your Home Assistant instance and show the blueprint import dialog with a specific blueprint pre-filled.
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.
Open your Home Assistant instance and show the blueprint import dialog with a specific blueprint pre-filled.
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

  1. New blueprint created using MQTT device triggers to avoid triggering unnecessarily the atuomation when any action is fired by mqtt devices.
  2. Added another generic button which handles long pressed as hold or long actions.
  3. 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

  1. Changed blueprint to use MQTT Topic Triggers instead of the HA SNZB-01 device sensor entity which no longer exist.

30/12/2023

  1. added dropdown to choose Automation Mode type (default is “parallel”), see Automation modes - Home Assistant
5 Likes

I am using this blueprint, but after updating Z2M to version 2.0 it no longer works (without enabling the “legacy_action_sensor: true” setting).
Any idea how to update the blueprint so that it works with MQTT Device Triggers instead?

I’ll need to fix this for myself, I’ll update here when I get time to look into it.

1 Like

Blueprint updated. Just click the import button at the top of the page and overwrite the blueprint.
You will need to update all the Automations that reference the blueprint but everything should stay the same except for the mqtt device name (which is now used instead of the sensor entity) and save the automation.
The other automations items should remain unchanged, so should be easy to update.

2 Likes

Thank you, much appreciated

@DaveIr I suggest you use the updated, first import at the top/main post.
The Automation willn no longer get triggered for any mqtt device action, just the specific ones. It’s a bit cleaner.

1 Like