ZHA Sonoff SNZB-01P wireless button short_double_long press action

Implement the corresponding blueprint for the current trigger conditions of not clicking, double clicking, and long pressing in automation after ZHA connects to SNZB-01P
Implemented three actions as shown in the figure

Open your Home Assistant instance and show the blueprint import dialog with a specific blueprint pre-filled.

blueprint:
  name: Sonoff Zigbee wireless Button SNZB-01P
  description: Setup actions for three functions of the SONOFF Zigbee button with Press ,Double Press, and long press.
  domain: automation
  input:
    button_id:
      name: Button
      description: The button to configure.
      selector:
        device:
          manufacturer: eWeLink
          model: SNZB-01P
          multiple: false
    press_action:
      name: Press Action
      description: Action to perform on Press.
      default: []
      selector:
        action: {}
    double_press_action:
      name: Double Press Action
      description: Action to perform on Double Press.
      default: []
      selector:
        action: {}
    long_press_action:
      name: Long Press Action
      description: Action to perform on Hold.
      default: []
      selector:
        action: {}
  source_url: https://community.home-assistant.io/t/zha-sonoff-snzb-01p-wireless-button-short-double-long-press-action/635422
variables:
  button_id: !input button_id
  press_action: !input press_action
  double_press_action: !input double_press_action
  long_press_action: !input long_press_action
trigger:
- platform: event
  event_type: zha_event
  event_data:
    device_id: !input button_id
action:
- choose:
  - conditions:
    - condition: template
      value_template: '{{ trigger.event.data.command == "toggle" }}'
    sequence: !input press_action
  - conditions:
    - condition: template
      value_template: '{{ trigger.event.data.command == "on" }}'
    sequence: !input double_press_action
  - conditions:
    - condition: template
      value_template: '{{ trigger.event.data.command == "off" }}'
    sequence: !input long_press_action
2 Likes

According to my HA the “import” link is pointing to:

Did you find a way to use this blueprint? It points to a wrong URL for me as well.
I’m new to blueprints and tried to investigate creating one from scratch with the above code but not able to because of my limited knowledge :frowning:

Sorry for late reply, I didn’t get any notification about it.

There are other similar topics for this.

Use this blueprint and the last message ParksideParade.
After (or while?) installing the blueprint, you need to change the device name, then it works.

1 Like

Fantastic, really appreciate the reply and help!

1 Like

Thank you very much for this great blueprint. It worked for me in a minute!

I am having an issue with this blueprint, and am looking for help. It seems to only work when pairing as soon as i move off the zha pairing screen the automation stops working. Please let me know what i am doing wrong.

SNZB-01P works in full functionality in Alexa. My choice for now.

The link still not updated to point at the scrip her is one that do ZHA Sonoff SNZB-01P wireless button short_double_long press action

I found that I simply could not find my button “No matching devices found” Does anybody know why?

Online
Device type
EndDevice
Zigbee Model
SNZB-01P
Zigbee Manufacturer
eWeLink

1 Like

I am having the same issue - did you already find a solution ?

I’m also getting the matching device not found error, can anyone solve the problem?

Same here. please find a solution :frowning:

As of a few releases ago, you can simply Edit an imported blueprint and convert it to an automation which uses whatever device you want. No need to wait for the blueprint itself to be fixed - simply follow the steps in the docs.

I solved the problem by opening the yaml file and changing the manufacturer from eWeLink to SONOFF

Can I use Sonoff zigbee bridge ultra instead of dongle?

I too used this to fix the filter in blueprint. I have added to a GitHub repo that can be used to directly import into HA as blueprint, for convenience.

    device:
      manufacturer: SONOFF
      #model: SNZB-01P
      multiple: false

automation/sonoff-snzb-01p-wireless-button.yaml

1 Like

Hi There. I was able to import blueprint and find my SNZB-01P unit, but none of the three actions seems to be working or triggering any actions (i have tried bulbs, fans, on, off and toggle functions). I confirm that SNZB-01P unit is receiving the physical commands and record them at Device/Entity level. Any ideas what might be happening?