Zigbee2MQTT - Sonoff Wireless Switch (SNZB-01)

For me is OK, but little modify.
DELETE: “attribute: action” (in trigger block) → because it is not attribute but sensor (you must choice sensor with “action” on the end of name)
and replace quotation marks, because import changed it. Must be:

action:
- variables:
    command: '{{ trigger.to_state.state }}'
- choose:
  - conditions:
    - "{{ command == 'single' }}"
    sequence: !input single_press
  - conditions:
    - "{{ command == 'double' }}"
    sequence: !input double_press
  - conditions:
    - "{{ command == 'long' }}"
    sequence: !input long_press

I modified with File editor in blueprints/automation/Stringer
And reload automations!

And thats it.

3 Likes

I am having this problem too, did you find a solution?

hello,
blueprint works perfectly but I would like to send a notification when there is a click on the button.
The button action works but I don’t get the notification.
Do you know why ?

alias: Bouton veilleuse Ethan
description: “”
use_blueprint:
path: AramidX/sonoff_snzb01_wireless_switch_z2m.yaml
input:
switch: sensor.bouton_veilleuse_ethan_action
single_press:
- type: turn_on
device_id: ccae2db0bd0034154045fe7ecaef7315
entity_id: switch.prise_veilleuse_ethan
domain: switch
- service: notify.mobile_app_pocof3kevin
data:
message: Veilleuse allumée
double_press:
- type: turn_off
device_id: ccae2db0bd0034154045fe7ecaef7315
entity_id: switch.prise_veilleuse_ethan
domain: switch

Thanks in advance

Hi have a odd problem, when i use blueprint, put my sonoff switch in entities, save it to automation it dont save it?
If i put sonoff_button1_aktion in entities it saves but not work, but when i put sonoff_button1 in entities the automation dissapear ??

The solution I found is to use a different blueprint which is really working:

2 Likes

Old topic, old issue (probably since August z2m update) but maybe it help someone.
I had problem to trigger action because it was ending with unknown reason “null”. It was issue with restart mode of automation when it was triggered by button release action.

So simple fix is to change mode to queued or single.