Description
I created a Blueprint to easily map the various button actions (or “scenes” as Inovelli calls them) for both the Inovelli Red On/Off Switch (LZW30-SN) and Inovelli Red Dimmer Switch (LZW31-SN).
I couldn’t find an existing blueprint for these switches when using the stable zwave
integration (not the OZW beta).
This supports all the actions the switches support: On/Off press, hold, release, x2, x3, x4, x5, and config button.
The Blueprint
Non-gist version:
blueprint:
name: Inovelli Red On/Off or Dimmer Switch Scenes
description:
Perform actions on various scenes supported by the Inovelli Red On/Off or Dimmer Switches.
Note that the x2, x3, x4, x5 variants DO NOT work if you have put your switch in 'Instant On' mode.
domain: automation
input:
inovelli_switch:
name: Inovelli Red On/Off Switch
description: The Inovelli Red On/Off or Dimmer Switch to do actions on
selector:
entity:
domain: zwave
up_action:
name: Press Up Once Action
description: Action to perform when pressing up once
default: []
selector:
action:
down_action:
name: Press Down Once Action
description: Action to perform when pressing down once
default: []
selector:
action:
up_hold_action:
name: Hold Up Action
description: Action to perform when holding the up button
default: []
selector:
action:
up_release_action:
name: Release Up Action
description: Action to perform when releasing the up button
default: []
selector:
action:
down_hold_action:
name: Hold Down Action
description: Action to perform when holding the down button
default: []
selector:
action:
down_release_action:
name: Release Down Action
description: Action to perform when releasing the down button
default: []
selector:
action:
config_action:
name: Config Button Action
description: The action to perform when the config button is pressed once
default: []
selector:
action:
up_x2_action:
name: Press Up Twice Action
description: Action to perform when pressing up twice
default: []
selector:
action:
down_x2_action:
name: Press Down Twice Action
description: Action to perform when pressing down twice
default: []
selector:
action:
up_x3_action:
name: Press Up 3 Times Action
description: Action to perform on when pressing up 3 times
default: []
selector:
action:
down_x3_action:
name: Press Down 3 Times Action
description: Action to perform when pressing down 3 times
default: []
selector:
action:
up_x4_action:
name: Press Up 4 Times Action
description: Action to perform when pressing up 4 times
default: []
selector:
action:
down_x4_action:
name: Press Down 4 Times Action
description: Action to perform when pressing down 4 times
default: []
selector:
action:
up_x5_action:
name: Press Up 5 Times Action
description: Action to perform when pressing up 5 times
default: []
selector:
action:
down_x5_action:
name: Press Down 5 Times Action
description: Action to perform when pressing down 5 times
default: []
selector:
action:
mode: parallel
max_exceeded: silent
variables:
# Mappings from https://support.inovelli.com/portal/en/kb/articles/how-to-setting-up-scenes-in-home-assistant
# Buttons (scene_id)
down_button: 1
up_button: 2
config_button: 3
# Action types (scene_data)
press_x1: 7680
press_x2: 7860
press_x3: 7920
press_x4: 7980
press_x5: 8040
hold: 7800
release: 7740
# Shorthand to access the trigger data
button: "{{ trigger.event.data.scene_id }}"
action_type: "{{ trigger.event.data.scene_data }}"
trigger:
- platform: event
event_type: zwave.scene_activated
event_data:
entity_id: !input inovelli_switch
action:
choose:
- conditions: "{{ button == up_button }}"
sequence:
- choose:
- conditions: "{{ action_type == press_x1 }}"
sequence: !input up_action
- conditions: "{{ action_type == press_x2 }}"
sequence: !input up_x2_action
- conditions: "{{ action_type == press_x3 }}"
sequence: !input up_x3_action
- conditions: "{{ action_type == press_x4 }}"
sequence: !input up_x4_action
- conditions: "{{ action_type == press_x5 }}"
sequence: !input up_x5_action
- conditions: "{{ action_type == hold }}"
sequence: !input up_hold_action
- conditions: "{{ action_type == release }}"
sequence: !input up_release_action
- conditions: "{{ button == down_button }}"
sequence:
- choose:
- conditions: "{{ action_type == press_x1 }}"
sequence: !input down_action
- conditions: "{{ action_type == press_x2 }}"
sequence: !input down_x2_action
- conditions: "{{ action_type == press_x3 }}"
sequence: !input down_x3_action
- conditions: "{{ action_type == press_x4 }}"
sequence: !input down_x4_action
- conditions: "{{ action_type == press_x5 }}"
sequence: !input down_x5_action
- conditions: "{{ action_type == hold }}"
sequence: !input down_hold_action
- conditions: "{{ action_type == release }}"
sequence: !input down_release_action
- conditions: "{{ button == config_button and action_type == press_x1 }}"
sequence: !input config_action
I’m happy to take any feedback or suggestions on this blueprint.
Usage
Inputs
The Switch
-
inovelli_switch
(Note, this is thezwave
domain entity for your switch, not theswitch
entity)
Actions
up_action
down_action
up_hold_action
up_release_action
down_hold_action
down_release_action
config_action
up_x2_action
down_x2_action
up_x3_action
down_x3_action
up_x4_action
down_x4_action
up_x5_action
down_x5_action
Example
- alias: Front Switch Leave House
use_blueprint:
path: inovelli_red_on_off_or_dimmer_scenes.yaml
input:
inovelli_switch: zwave.front_yard_switch
config_action:
- service: script.turn_on
entity_id: script.leaving_house
down_hold_action:
- service: script.turn_on
entity_id: script.leaving_house