This is a blueprint for triggering actions based on presses of the On/Off/Config buttons of the Inovelli LZW31 Red-Series Dimmer using the new ZWave-JS Integration.
blueprint:
name: Inovelli Red Series LZW31-SN Dimmer (ZWave-JS)
description: Create automations for the Inovelli Red Series LZW31-SN Dimmer using the ZWave-JS integration.
domain: automation
input:
inovelli_switch:
name: Inovelli Dimmer
description: "List of available inovelli LZW31-SN dimmers."
selector:
device:
integration: zwave_js
manufacturer: Inovelli
model: LZW31-SN
## Config Press 1 time
config_button:
name: Button C - Config press 1x
description: "Action to run, when the config button is pressed one time."
default: []
selector:
action: {}
## Paddle Press 1 time
button_a:
name: Button A - Up/On press 1x
description: "Action to run, when the button is pressed one time."
default: []
selector:
action: {}
button_b:
name: Button B - Down/Off press 1x
description: "Action to run, when the button is pressed one time."
default: []
selector:
action: {}
## Paddle Held Down
button_a_held:
name: Button A - Up/On held down
description: "Action to run, when the button is held down."
default: []
selector:
action: {}
button_b_held:
name: Button B - Down/Off held down
description: "Action to run, when the button is held down."
default: []
selector:
action: {}
## Paddle Press 2 times
button_a2:
name: Button A - Up/On press 2x
description: "Action to run, when the button is pressed two times."
default: []
selector:
action: {}
button_b2:
name: Button B - Down/Off press 2x
description: "Action to run, when the button is pressed two times."
default: []
selector:
action: {}
## Paddle Press 3 times
button_a3:
name: Button A - Up/On press 3x
description: "Action to run, when the button is pressed three times."
default: []
selector:
action: {}
button_b3:
name: Button B - Down/Off press 3x
description: "Action to run, when the button is pressed three times."
default: []
selector:
action: {}
## Paddle Press 4 times
button_a4:
name: Button A - Up/On press 4x
description: "Action to run, when the button is pressed four times."
default: []
selector:
action: {}
button_b4:
name: Button B - Down/Off press 4x
description: "Action to run, when the button is pressed four times."
default: []
selector:
action: {}
## Paddle Press 5 times
button_a5:
name: Button A - Up/On press 5x
description: "Action to run, when the button is pressed five times."
default: []
selector:
action: {}
button_b5:
name: Button B - Down/Off press 5x
description: "Action to run, when the button is pressed five times."
default: []
selector:
action: {}
mode: single
max_exceeded: silent
variables:
device_id: !input inovelli_switch
trigger:
- platform: event
event_type: zwave_js_value_notification
condition: "{{ trigger.event.data.device_id == device_id }}"
action:
- variables:
button_id: "{{ trigger.event.data.property_key_name }}"
press_count: "{{ trigger.event.data.value }}"
- service: "logbook.log"
data:
name: "Button Id"
message: "{{ button_id }}"
- service: "logbook.log"
data:
name: "Press Count"
message: "{{ press_count }}"
- service: "logbook.log"
data:
name: "Device"
message: "{{ zwave_device }}"
- choose:
- conditions: '{{ button_id == "003" and press_count == "KeyPressed" }}'
sequence: !input config_button
- conditions: '{{ button_id == "002" and press_count == "KeyPressed" }}'
sequence: !input button_a
- conditions: '{{ button_id == "001" and press_count == "KeyPressed" }}'
sequence: !input button_b
- conditions: '{{ button_id == "002" and press_count == "KeyHeldDown" }}'
sequence: !input button_a_held
- conditions: '{{ button_id == "001" and press_count == "KeyHeldDown" }}'
sequence: !input button_b_held
- conditions: '{{ button_id == "002" and press_count == "KeyPressed2x" }}'
sequence: !input button_a2
- conditions: '{{ button_id == "001" and press_count == "KeyPressed2x" }}'
sequence: !input button_b2
- conditions: '{{ button_id == "002" and press_count == "KeyPressed3x" }}'
sequence: !input button_a3
- conditions: '{{ button_id == "001" and press_count == "KeyPressed3x" }}'
sequence: !input button_b3
- conditions: '{{ button_id == "002" and press_count == "KeyPressed4x" }}'
sequence: !input button_a4
- conditions: '{{ button_id == "001" and press_count == "KeyPressed4x" }}'
sequence: !input button_b4
- conditions: '{{ button_id == "002" and press_count == "KeyPressed5x" }}'
sequence: !input button_a5
- conditions: '{{ button_id == "001" and press_count == "KeyPressed5x" }}'
sequence: !input button_b5
Edit 4/7/21: Updated to support HA 2021.4.0 release
This is great and has saved me a ton of time trying to find out button ids and press_counts variable keys. It seems you can only program 1 type of button press condition per set of actions. I wonder if it would be possible to set multiple button press configurations with different actions all in one automation? That would make each switch much more organized when they have different actions for different button presses vs having like 6 automations to handle them all.
It must have been an unrelated error (lots of config changes due to migrating to zwavejs)! It works GREAT! This is amazing. Thank you for the work you did on this.
UPDATE: This works for 2021.03.0 ONLY. Use Jeremyâs original version above for 2021.03.1 and above.
@jerelabs Here is a version fixed for Home Assistant 2021.03.0. These are fixes that I used in my personal automation. I have tested it out with every click combination (including holding down the buttons, which Iâve never tried before).
This is my first time playing with Blueprints and I see why everyone is excited about them now!
blueprint:
name: Inovelli Red Series LZW31-SN Dimmer (ZWave-JS)
description: Create automations for the Inovelli Red Series LZW31-SN Dimmer using the ZWave-JS integration.
domain: automation
input:
inovelli_switch:
name: Inovelli Dimmer
description: "List of available inovelli LZW31-SN dimmers."
selector:
device:
integration: zwave_js
manufacturer: Inovelli
model: LZW31-SN
## Config Press 1 time
config_button:
name: Button C - Config press 1x
description: "Action to run, when the config button is pressed one time."
default: []
selector:
action: {}
## Paddle Press 1 time
button_a:
name: Button A - Up/On press 1x
description: "Action to run, when the button is pressed one time."
default: []
selector:
action: {}
button_b:
name: Button B - Down/Off press 1x
description: "Action to run, when the button is pressed one time."
default: []
selector:
action: {}
## Paddle Held Down
button_a_held:
name: Button A - Up/On held down
description: "Action to run, when the button is held down."
default: []
selector:
action: {}
button_b_held:
name: Button B - Down/Off held down
description: "Action to run, when the button is held down."
default: []
selector:
action: {}
## Paddle Press 2 times
button_a2:
name: Button A - Up/On press 2x
description: "Action to run, when the button is pressed two times."
default: []
selector:
action: {}
button_b2:
name: Button B - Down/Off press 2x
description: "Action to run, when the button is pressed two times."
default: []
selector:
action: {}
## Paddle Press 3 times
button_a3:
name: Button A - Up/On press 3x
description: "Action to run, when the button is pressed three times."
default: []
selector:
action: {}
button_b3:
name: Button B - Down/Off press 3x
description: "Action to run, when the button is pressed three times."
default: []
selector:
action: {}
## Paddle Press 4 times
button_a4:
name: Button A - Up/On press 4x
description: "Action to run, when the button is pressed four times."
default: []
selector:
action: {}
button_b4:
name: Button B - Down/Off press 4x
description: "Action to run, when the button is pressed four times."
default: []
selector:
action: {}
## Paddle Press 5 times
button_a5:
name: Button A - Up/On press 5x
description: "Action to run, when the button is pressed five times."
default: []
selector:
action: {}
button_b5:
name: Button B - Down/Off press 5x
description: "Action to run, when the button is pressed five times."
default: []
selector:
action: {}
mode: single
max_exceeded: silent
trigger:
- platform: event
event_type: zwave_js_event
variables:
device_id: !input inovelli_switch
presses: |
{% set value = trigger.event.data.value %}
{% if value is number %}
{% if value|int == 1 %}
KeyHeldRelease
{% elif value|int == 2 %}
KeyHeldDown
{% elif value|int == 0 %}
1
{% else %}
{{ value|int - 1 }}
{% endif %}
{% else %}
{{ value|replace("KeyPressed","")|replace("x","") }}
{% endif %}
button: |
{% if trigger.event.data.property_key_name|int == 1 %}
bottom
{% elif trigger.event.data.property_key_name|int == 2 %}
top
{% elif trigger.event.data.property_key_name|int == 3 %}
config
{% endif %}
condition: "{{ trigger.event.data.device_id == device_id }}"
action:
# - service: "logbook.log"
# data:
# name: "Button"
# message: "{{ button }}"
# - service: "logbook.log"
# data:
# name: "Presses"
# message: "{{ presses }}"
- choose:
- conditions: '{{ button == "config" }}'
sequence: !input config_button
- conditions: '{{ button == "top" and presses|int == 1 }}'
sequence: !input button_a
- conditions: '{{ button == "bottom" and presses|int == 1 }}'
sequence: !input button_b
- conditions: '{{ button == "top" and presses == "KeyHeldDown" }}'
sequence: !input button_a_held
- conditions: '{{ button == "bottom" and presses == "KeyHeldDown" }}'
sequence: !input button_b_held
- conditions: '{{ button == "top" and presses|int == 2 }}'
sequence: !input button_a2
- conditions: '{{ button == "bottom" and presses|int == 2 }}'
sequence: !input button_b2
- conditions: '{{ button == "top" and presses|int == 3 }}'
sequence: !input button_a3
- conditions: '{{ button == "bottom" and presses|int == 3 }}'
sequence: !input button_b3
- conditions: '{{ button == "top" and presses|int == 4 }}'
sequence: !input button_a4
- conditions: '{{ button == "bottom" and presses|int == 4 }}'
sequence: !input button_b4
- conditions: '{{ button == "top" and presses|int == 5 }}'
sequence: !input button_a5
- conditions: '{{ button == "bottom" and presses|int == 5 }}'
sequence: !input button_b5
UPDATE : After banging my head on my desk trying to get HA to see my switch correctly (restarting the server, updating ZwaveJS, restarting the integration, etc. etc.), I excluded it and re-added it. HA was able to see it properly the second time and now itâs listed as available for the Blueprint to use. Thanks!
Super basic question - Iâm transitioning from Hubitat and only got HA with Z-Wave JS up and running yesterday. How do I assign this to a LZW31-SN device I have already linked via Z-Wave JS? I donât see any way to tell HA that itâs an Inovelli device.
Iâve added the Blueprint, but when I go to use it, it doesnât seem to find my LZW31-SN as a suitable device (it doesnât show up in the drop-down).
Thanks for the update, now some of my automations which broke during the April update work again.
I have a problem that many of my Inovelliy LZW31-SN devices show âunknownâ as Manufacturer and Model. They work fine, but I cannot select these in your blueprint, they donât show up in the Device drop-down.
Any idea how I can âforceâ these devices to show the correct values for Manufacturer and Model?
How is everyone using this to emulate dimming for a smart bulb? I would like to dim/brighten my Hue bulbs using the held down and maybe add the released event. It would be nice to do it all within the same blueprint but it seems that you just get a single held down and released event.
Echoing what jrhubott said, this is still the missing piece for me (using these with Hue bulbs). Iâd really love to be able to use press and hold dimming.
I canât get any automations to work using the blueprint. When I click the defined button - in this case the C button, it fires the event, but it does not do the next steps and ends up with that error.