Closed harvindhillon closed 4 months ago
name: Sonoff SNZB 01P
service: ZHA
event_type: zha_event
identifier_key: device_id
buttons:
- actions:
- title: press
conditions:
- key: command
value: "toggle"
- title: press 2x
conditions:
- key: command
value: "on"
- title: hold
conditions:
- key: command
value: "off"
name: Sonoff SNZB 01P
service: Zigbee2MQTT
event_type: mqtt
mqtt_topic_format: zigbee2mqtt/+/action
buttons:
- actions:
- title: press
conditions:
- key: payload
value: single
- title: press 2x
conditions:
- key: payload
value: double
- title: hold
conditions:
- key: payload
value: long
Not sure how to create a pull request, but I guess it could help others. Have a picture, the code is pretty much the same as the older Sonoff Button
Not sure how to create a pull request,
The official guide is a bit unclear imho. The gist is you fork the repo, make whatever additions/changes you want, commit them to your fork, and then when viewing your fork's main page here on github you'll see a button labelled "Contribute" with the option to open a pull request. Here's a screenshot of how it would look to make a pull request of your changes.
This issue is stale because it has been open for 30 days with no activity.
Apologies, got distracted, I created the pull, and corrected a Z2M Tuya TS004 button order as well that I found when testing
Not sure why it was in reverse order, the commenter in the file didnt know why as well :)
Support for the newer ZNZB-01P Sonoff button