Last active
January 20, 2025 05:26
-
-
Save xantiagoma/29133ee488f159c1c4a2e4e9bdbd1472 to your computer and use it in GitHub Desktop.
This file contains 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-01 Zigbee Wireless Switch | |
description: Automate your Sonoff SNZB-01 Zigbee Wireless Switch via Zigbee2MQTT. | |
domain: automation | |
input: | |
switch: | |
name: Sonoff SNZB-01 Zigbee Wireless Switch | |
description: Sonoff SNZB-01 Zigbee Wireless Switch to use | |
selector: | |
entity: | |
integration: mqtt | |
domain: sensor | |
single_press: | |
name: Single Press | |
description: Action to run on single press | |
default: [] | |
selector: | |
action: {} | |
double_press: | |
name: Double Press | |
description: Action to run on double press | |
default: [] | |
selector: | |
action: {} | |
long_press: | |
name: Long Press | |
description: Action to run on long press (4 seconds) | |
default: [] | |
selector: | |
action: {} | |
source_url: https://github.com/AramidX/ha-blueprint/blob/dc4b846bc4dfa8725526606b07c051947bfc9687/blueprints/sonoff/sonoff_snzb01_wireless_switch_z2m.yaml | |
mode: restart | |
max_exceeded: silent | |
condition: | |
condition: template | |
value_template: '{{ trigger.to_state.attributes.action in ( ''single'',''double'',''long'') }}' | |
trigger: | |
- platform: state | |
entity_id: !input "switch" | |
attribute: action | |
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" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment