Sonoff SNZB‑01M Remote (ZHA) — 16‑Action Event-Based Control

This device was officially added to ZHA on April 1. Updating HA should make it work now, no need to install the quirk anymore :smiley:

I've tried all of the .yaml iterations in this thread using ZHA and nothing works. The pick fires and sends signals, but nothing happens. ZHA is updated as well, just nothing happens. There also seems to be several formatting errors in some of the .yaml codes posted here....

Guess I gotta return this and get something else.

It's sad that it didn't work. Did you try my blueprint? Did you take a look at the traces after pressing buttons on the device? ZHA debug is not the best but can also highlight what the device is sending.

Disclaimer: HA relative Newby and just got the SNXB-01M yesterday so new to this thread. After the firmware upgrade and replacing code per [alexxandro87], I got it working for everything but long press. Long press results in a command: stop whereas the other 3 choices result in commands: single, double and triple. Not critical for me but I would like long press to work. Suggestions?

Hello everybody I've gotten my button to work by setting up automations in the device section of home Assistant. Can somebody explain to me why they use the Blueprint instead of this way? What are the benefits and why should I consider doing it this way?
Edit: I tried the blueprint and it's awesome.
But i run into the same issue as @TomPT everything works besides the long press.
Happy about any feedback on how to solve this!

After the latest HA update,

  • Core 2026.7.1
  • Supervisor 2026.06.2
  • Operating System 18.1
  • Frontend 20260624.4
    you must revert to the project's original YAML file

or replace it with this one:

blueprint:
  name: Sonoff SNZB-01M (ZHA)
  description: >
    ZHA blueprint for the Sonoff SNZB-01M using zha_event. Supports 4 buttons
    (endpoints 1-4), each providing single, double, triple and long press
    actions - 16 actions in total.

    Compatible with both naming schemes: standardized ZHA commands
    (remote_button_short_press, ...) emitted by native ZHA support,
    and raw firmware commands (single, double, triple, long) emitted
    by the legacy quirk.

    Physical button embossing:
      - Top Left -> one dot
      - Top Right -> two dots
      - Bottom Left -> three dots
      - Bottom Right -> four dots
  domain: automation
  author: jam3

  input:
    remote:
      name: Sonoff SNZB-01M Remote
      description: Select the remote from the device list
      selector:
        device:
          integration: zha
          manufacturer: SONOFF
    automation_mode:
      name: Automation mode
      description: >
        Only one automation mode can be used for all buttons.
        Automation modes documentation:
        https://www.home-assistant.io/docs/automation/modes/
      default: queued
      selector:
        select:
          options:
            - queued
            - single
            - restart
            - parallel

    # -------- BUTTON 1 --------
    button1_single:
      name: Button 1 - Single press
      default: []
      selector: { action: {} }
    button1_double:
      name: Button 1 - Double press
      default: []
      selector: { action: {} }
    button1_triple:
      name: Button 1 - Triple press
      default: []
      selector: { action: {} }
    button1_long:
      name: Button 1 - Long press
      default: []
      selector: { action: {} }

    # -------- BUTTON 2 --------
    button2_single:
      name: Button 2 - Single press
      default: []
      selector: { action: {} }
    button2_double:
      name: Button 2 - Double press
      default: []
      selector: { action: {} }
    button2_triple:
      name: Button 2 - Triple press
      default: []
      selector: { action: {} }
    button2_long:
      name: Button 2 - Long press
      default: []
      selector: { action: {} }

    # -------- BUTTON 3 --------
    button3_single:
      name: Button 3 - Single press
      default: []
      selector: { action: {} }
    button3_double:
      name: Button 3 - Double press
      default: []
      selector: { action: {} }
    button3_triple:
      name: Button 3 - Triple press
      default: []
      selector: { action: {} }
    button3_long:
      name: Button 3 - Long press
      default: []
      selector: { action: {} }

    # -------- BUTTON 4 --------
    button4_single:
      name: Button 4 - Single press
      default: []
      selector: { action: {} }
    button4_double:
      name: Button 4 - Double press
      default: []
      selector: { action: {} }
    button4_triple:
      name: Button 4 - Triple press
      default: []
      selector: { action: {} }
    button4_long:
      name: Button 4 - Long press
      default: []
      selector: { action: {} }

# ───────── AUTOMATION PART ─────────
mode: !input automation_mode
max_exceeded: silent

variables:
  remote_device_id: !input remote

trigger:
  - platform: event
    event_type: zha_event

condition:
  - condition: template
    value_template: >
      {{ trigger.event.data.device_id == remote_device_id }}

action:
  - variables:
      endpoint: "{{ trigger.event.data.endpoint_id }}"
      command: "{{ trigger.event.data.command }}"

  - choose:
      # -------- BUTTON 1 --------
      - conditions: "{{ endpoint == 1 and command in ['remote_button_short_press', 'single'] }}"
        sequence: !input button1_single
      - conditions: "{{ endpoint == 1 and command in ['remote_button_double_press', 'double'] }}"
        sequence: !input button1_double
      - conditions: "{{ endpoint == 1 and command in ['remote_button_triple_press', 'triple'] }}"
        sequence: !input button1_triple
      - conditions: "{{ endpoint == 1 and command in ['remote_button_long_press', 'long'] }}"
        sequence: !input button1_long

      # -------- BUTTON 2 --------
      - conditions: "{{ endpoint == 2 and command in ['remote_button_short_press', 'single'] }}"
        sequence: !input button2_single
      - conditions: "{{ endpoint == 2 and command in ['remote_button_double_press', 'double'] }}"
        sequence: !input button2_double
      - conditions: "{{ endpoint == 2 and command in ['remote_button_triple_press', 'triple'] }}"
        sequence: !input button2_triple
      - conditions: "{{ endpoint == 2 and command in ['remote_button_long_press', 'long'] }}"
        sequence: !input button2_long

      # -------- BUTTON 3 --------
      - conditions: "{{ endpoint == 3 and command in ['remote_button_short_press', 'single'] }}"
        sequence: !input button3_single
      - conditions: "{{ endpoint == 3 and command in ['remote_button_double_press', 'double'] }}"
        sequence: !input button3_double
      - conditions: "{{ endpoint == 3 and command in ['remote_button_triple_press', 'triple'] }}"
        sequence: !input button3_triple
      - conditions: "{{ endpoint == 3 and command in ['remote_button_long_press', 'long'] }}"
        sequence: !input button3_long

      # -------- BUTTON 4 --------
      - conditions: "{{ endpoint == 4 and command in ['remote_button_short_press', 'single'] }}"
        sequence: !input button4_single
      - conditions: "{{ endpoint == 4 and command in ['remote_button_double_press', 'double'] }}"
        sequence: !input button4_double
      - conditions: "{{ endpoint == 4 and command in ['remote_button_triple_press', 'triple'] }}"
        sequence: !input button4_triple
      - conditions: "{{ endpoint == 4 and command in ['remote_button_long_press', 'long'] }}"
        sequence: !input button4_long
2 Likes

Replacing it as directed solved my issue! TY @alexxandro87

I used this and everything works except the long press. In the activity overview it shows that the event "long-press" was fired, but instead of executing what I set in the automation it repeats stating "Step event was fired with parameters: {'step_mode': 1, 'step_size': 30, 'transition_time': 10, 'options_mask': None, 'options_override': None} with arguments: [1, 30, 10]"
Does anybody have advice on how to fix this or an idea where my Problem could come from?

Hey man,

None of this works and I’ve spent too many hours on this now. Please man I would appreciate if you explained the solution to me as if I was 5 years old. What should I do exactly after I have paired the device to HA.

You say “revert to the projects original YAML file” - what does that mean? The initial blueprint imported from the initial post here? The blueprint named “Sonoff SNZB-01M (ZHA)” in HA?
That’s the one I have, I never did any changes to the Blueprint.

When you say “replace it with this one” - I don’t know how/where to do that.

Anyway my issue is that none of the buttons does anything when used in the blueprint automations. I have tried several different events but none work. Also I have like 50 devices on my HA without issues, so I should be capable of getting it to work normally.

I did install the quirk earlier, and have not uninstalled it after I read the thread.. Should that be required? Also I have updated the firmware to the latest firmware since today.

The event activity under the device is just “On event was fired” / “Off event was fired”
I don’t know how to get better logs than that.

Thank you

If you used a custom quirk, it may be interfering with the device handler shipped in zha-device-handlers (part of Home Assistant Core); I posted about it here.

Yes I removed the custom quirk. Now single presses are working but not holding buttons.
ANy idea?

@ajkavanagh hi man, any idea why long press are not working?

@TomPT @trifton
Did you guys ever get long press to work ?

wish i never got this fkass button

edit: ok replacing the YAML blueprint worked with the above code

Are you getting long press to work?