Created
November 28, 2023 14:55
-
-
Save haade-administrator/1a9c217a3f2cdf0ba149d4f2f186e6d4 to your computer and use it in GitHub Desktop.
Automate Sonoff SNZB-01P switch with blueprint for Home Assistant
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
blueprint: | |
name: Zigbee2MQTT - Sonoff SNZB-01P Scene Switch | |
description: Automate your Sonoff SNZB-01P Scene Switch via Zigbee2MQTT. | |
domain: automation | |
input: | |
switch: | |
name: Tuya 1-Button Scene Switch | |
description: Sonoff SNZB-01P Scene Switch to use | |
selector: | |
entity: | |
integration: mqtt | |
domain: | |
- sensor | |
multiple: false | |
button_one_short_press: | |
name: Single Press - Button | |
description: Action to run on button single press | |
default: [] | |
selector: | |
action: {} | |
button_one_double_press: | |
name: Double Press - Button | |
description: Action to run on button double press | |
default: [] | |
selector: | |
action: {} | |
button_one_long_press: | |
name: Long Press - Button | |
description: Action to run on button long press | |
default: [] | |
selector: | |
action: {} | |
source_url: https://gist.github.com/haade-administrator/1a9c217a3f2cdf0ba149d4f2f186e6d4 | |
mode: restart | |
max_exceeded: silent | |
trigger: | |
- platform: state | |
entity_id: !input switch | |
attribute: action | |
action: | |
- variables: | |
command: "{{ trigger.to_state.state }}" | |
- choose: | |
- conditions: | |
- "{{ command == 'single' }}" | |
sequence: !input button_one_short_press | |
- conditions: | |
- "{{ command == 'double' }}" | |
sequence: !input button_one_double_press | |
- conditions: | |
- "{{ command == 'long' }}" | |
sequence: !input button_one_long_press |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment