Description
This blueprint allows the configuration of one, two and three click events for Z-Wave enabled Enlighten Light Switches. Each on and off tap sequences allow you to choose a unique set of actions allowing for up to six total (including both on and off clicks).
Requirements
- Z-Wave-JS
- Enbrighten Z-Wave Light Switch
Installation
Click the below button to install the blueprint.
Or import the code into a new file in the blueprints file.
blueprint:
name: Enbrighten Z-Wave Switch Tap Events
description: Handle single, double and triple taps for Enlighten light switches.
domain: automation
input:
device:
name: Light Switch
description: Enlighten Switch that supports multi taps.
selector:
device:
integration: zwave_js
manufacturer: Enbrighten
entity:
domain: light
single_tap_on:
name: Single Tap On
description: Action(s) performed when on is clicked a single time. (light switch turns on by default)
default: []
selector:
action: {}
single_tap_off:
name: Single Tap Off
description: Action(s) performed when off is clicked a single time. (light switch turns off by default)
default: []
selector:
action: {}
double_tap_on:
name: Double Tap On
description: Action(s) performed when on is clicked a two times. (light switch DOES NOT turn on by default)
default: []
selector:
action: {}
double_tap_off:
name: Double Tap Off
description: Action(s) performed when off is clicked a two times. (light switch DOES NOT turn off by default)
default: []
selector:
action: {}
triple_tap_on:
name: Triple Tap On
description: Action(s) performed when on is clicked a three times. (light switch DOES NOT turn on by default)
default: []
selector:
action: {}
triple_tap_off:
name: Triple Tap Off
description: Action(s) performed when off is clicked a three times. (light switch DOES NOT turn off by default)
default: []
selector:
action: {}
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:
value_raw: "{{ trigger.event.data.value_raw }}"
property_key: "{{ trigger.event.data.property_key }}"
- choose:
- conditions: '{{ property_key == "001" }}'
sequence:
- choose:
- conditions: "{{ value_raw == 0 }}"
sequence: !input "single_tap_on"
- conditions: "{{ value_raw == 3 }}"
sequence: !input "double_tap_on"
- conditions: "{{ value_raw == 4}}"
sequence: !input "triple_tap_on"
- conditions: '{{ property_key == "002" }}'
sequence:
- choose:
- conditions: "{{ value_raw == 0 }}"
sequence: !input "single_tap_off"
- conditions: "{{ value_raw == 3 }}"
sequence: !input "double_tap_off"
- conditions: "{{ value_raw == 4 }}"
sequence: !input "triple_tap_off"
Credit
Thank you to @freshcoast for their work on ZWave-JS - GE/Jasco Double Taps blueprint. I used their blueprint for quite a while and used it as a base for this blueprint to learn a bit more about events.