Created
August 24, 2023 01:29
-
-
Save wired/c01208a9e26aca28c62fffd4e0f1c9a2 to your computer and use it in GitHub Desktop.
Home Assistant Blueprint: GE Switch Double and Triple Taps
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: GE Switch Double and Triple Taps | |
description: Create automations to react to double taps from supporting GE switches. | |
domain: automation | |
input: | |
device: | |
name: Switch Device | |
description: A GE switch that supports double taps. | |
selector: | |
device: | |
integration: zwave_js | |
multiple: false | |
# this didn't seem to work correctly for me | |
# manufacturer: GE/Jasco | |
double_tap_on: | |
name: Double Tap On | |
description: Actions to run for a double tap on. | |
default: [] | |
selector: | |
action: {} | |
double_tap_off: | |
name: Double Tap Off | |
description: Actions to run for a double tap off. | |
default: [] | |
selector: | |
action: {} | |
triple_tap_on: | |
name: Triple Tap On | |
description: Actions to run for a triple tap on. | |
default: [] | |
selector: | |
action: {} | |
triple_tap_off: | |
name: Triple Tap Off | |
description: Actions to run for a triple tap off. | |
default: [] | |
selector: | |
action: {} | |
source_url: https://gist.github.com/wired/c01208a9e26aca28c62fffd4e0f1c9a2 | |
# based on https://gist.github.com/kpine/65e6324a0e6a9d48f9f50f77310ecd7f | |
mode: single | |
max_exceeded: silent | |
trigger: | |
platform: event | |
event_type: zwave_js_value_notification | |
event_data: | |
device_id: !input device | |
command_class: 91 | |
action: | |
- variables: | |
prop: '{{ trigger.event.data.property_key }}' | |
value: '{{ trigger.event.data.value_raw }}' | |
- choose: | |
- conditions: '{{ value == 3 and prop == "002" }}' | |
sequence: !input double_tap_off | |
- conditions: '{{ value == 3 and prop == "001" }}' | |
sequence: !input double_tap_on | |
- conditions: '{{ value == 4 and prop == "002" }}' | |
sequence: !input triple_tap_off | |
- conditions: '{{ value == 4 and prop == "001" }}' | |
sequence: !input triple_tap_on |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment