Skip to content

Instantly share code, notes, and snippets.

@shannonfritz
Last active September 21, 2023 21:11
Show Gist options
  • Select an option

  • Save shannonfritz/e6f2fc1b13545f34ebead01cb33f864c to your computer and use it in GitHub Desktop.

Select an option

Save shannonfritz/e6f2fc1b13545f34ebead01cb33f864c to your computer and use it in GitHub Desktop.
Inovelli 2-in-1 VZM31 Home Assistant Blueprint
blueprint:
name: Inovelli VZM31 2-in-1 switch+dimmer v0.02
description: Create automations for multi-tap of buttons on the Inovelli Blue Series 2-in-1 switch + dimmer, model VZM31-SN
domain: automation
input:
inovelli_vzm31:
name: Inovelli VZM31
description: Inovelli VZM31 2-in-1 Switch (action).
selector:
device:
integration: zha
manufacturer: Inovelli
model: VZM31-SN
config_1x:
name: Config 1x Press
description: Action to run when Config button is Pressed 1 time.
default: []
selector:
action:
config_2x:
name: Config 2x Press
description: Action to run when Config button is Pressed 2 times.
default: []
selector:
action:
config_3x:
name: Config 3x Press
description: Action to run when Config button is Pressed 3 times.
default: []
selector:
action:
config_4x:
name: Config 4x Press
description: Action to run when Config button is Pressed 4 times.
default: []
selector:
action:
config_5x:
name: Config 5x Press
description: Action to run when Config button is Pressed 5 times.
default: []
selector:
action:
config_hold:
name: Config Hold
description: Action to run when Config button is Held.
default: []
selector:
action:
config_release:
name: Config Release
description: Action to run when Config button is Released.
default: []
selector:
action:
up_1x:
name: Up 1x Press
description: Action to run when Up button is Pressed 1 time.
default: []
selector:
action:
up_2x:
name: Up 2x Press
description: Action to run when Up button is Pressed 2 times.
default: []
selector:
action:
up_3x:
name: Up 3x Press
description: Action to run when Up button is Pressed 3 times.
default: []
selector:
action:
up_4x:
name: Up 4x Press
description: Action to run when Up button is Pressed 4 times.
default: []
selector:
action:
up_5x:
name: Up 5x Press
description: Action to run when Up button is Pressed 5 times.
default: []
selector:
action:
up_hold:
name: Up Hold
description: Action to run when Up button is Held.
default: []
selector:
action:
up_release:
name: Up Release
description: Action to run when Up button is Released.
default: []
selector:
action:
down_1x:
name: Down 1x Press
description: Action to run when Down button is Pressed 1 time.
default: []
selector:
action:
down_2x:
name: Down 2x Press
description: Action to run when Down button is Pressed 2 times.
default: []
selector:
action:
down_3x:
name: Down 3x Press
description: Action to run when Down button is Pressed 3 times.
default: []
selector:
action:
down_4x:
name: Down 4x Press
description: Action to run when Down button is Pressed 4 times.
default: []
selector:
action:
down_5x:
name: Down 5x Press
description: Action to run when Down button is Pressed 5 times.
default: []
selector:
action:
down_hold:
name: Down Hold
description: Action to run when Down button is Held.
default: []
selector:
action:
down_release:
name: Down Release
description: Action to run when Down button is Released.
default: []
selector:
action:
mode: parallel
max_exceeded: silent
variables:
device_id: !input "inovelli_vzm31"
trigger:
- platform: event
event_type: zha_event
condition: "{{ trigger.event.data.device_id == device_id }}"
action:
- variables:
command: "{{ trigger.event.data.command }}"
- service: "logbook.log"
data:
name: 'ZHA'
message: 'received event: {{ command }}'
- choose:
- conditions:
- "{{ command == 'button_3_press' }}"
sequence: !input config_1x
- conditions:
- "{{ command == 'button_3_double' }}"
sequence: !input config_2x
- conditions:
- "{{ command == 'button_3_triple' }}"
sequence: !input config_3x
- conditions:
- "{{ command == 'button_3_quadruple' }}"
sequence: !input config_4x
- conditions:
- "{{ command == 'button_3_quintuple' }}"
sequence: !input config_5x
- conditions:
- "{{ command == 'button_3_hold' }}"
sequence: !input config_hold
- conditions:
- "{{ command == 'button_3_release' }}"
sequence: !input config_release
- conditions:
- "{{ command == 'button_2_press' }}"
sequence: !input up_1x
- conditions:
- "{{ command == 'button_2_double' }}"
sequence: !input up_2x
- conditions:
- "{{ command == 'button_2_triple' }}"
sequence: !input up_3x
- conditions:
- "{{ command == 'button_2_quadruple' }}"
sequence: !input up_4x
- conditions:
- "{{ command == 'button_2_quintuple' }}"
sequence: !input up_5x
- conditions:
- "{{ command == 'button_2_hold' }}"
sequence: !input up_hold
- conditions:
- "{{ command == 'button_2_release' }}"
sequence: !input up_release
- conditions:
- "{{ command == 'button_1_press' }}"
sequence: !input down_1x
- conditions:
- "{{ command == 'button_1_double' }}"
sequence: !input down_2x
- conditions:
- "{{ command == 'button_1_triple' }}"
sequence: !input down_3x
- conditions:
- "{{ command == 'button_1_quadruple' }}"
sequence: !input down_4x
- conditions:
- "{{ command == 'button_1_quintuple' }}"
sequence: !input down_5x
- conditions:
- "{{ command == 'button_1_hold' }}"
sequence: !input down_hold
- conditions:
- "{{ command == 'button_1_release' }}"
sequence: !input down_release
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment