[ZHA] Inovelli VZM31-SN Blue Series 2-1 Switch

For the new Zigbee Inovelli Blue Series 2-1 switch using ZHA.

Open your Home Assistant instance and show the blueprint import dialog with a specific blueprint pre-filled.

blueprint:
  name: "Inovelli VZM31-SN Blue Series 2-1 Switch (ZHA)"
  description: Create automations for the Inovelli VZM31-SN using ZHA.
  domain: automation
  input:
    inovelli_switch:
      name: Inovelli VZM31-SN
      description: "List of available Inovelli VZM31-SN switches."
      selector:
        device:
          filter:
            integration: zha
            manufacturer: Inovelli
            model: VZM31-SN
          multiple: false
    ## Pressed Once
    button_1:
      name: Down paddle pressed
      description: "Action to run when down paddle is pressed once."
      default: []
      selector:
        action:
    button_2:
      name: Up paddle pressed
      description: "Action to run when up paddle is pressed once."
      default: []
      selector:
        action:
    button_3:
      name: Config button pressed
      description: "Action to run when config button is pressed once."
      default: []
      selector:
        action:
    ## Held
    button_1_hold:
      name: Down paddle held
      description: "Action to run when down paddle is held."
      default: []
      selector:
        action:
    button_2_hold:
      name: Up paddle held
      description: "Action to run when up paddle is held."
      default: []
      selector:
        action:
    button_3_hold:
      name: Config button held
      description: "Action to run when config button is held."
      default: []
      selector:
        action:
    ## Released
    button_1_release:
      name: Down paddle released
      description: "Action to run when down paddle is released."
      default: []
      selector:
        action:
    button_2_release:
      name: Up paddle released
      description: "Action to run when up paddle is released."
      default: []
      selector:
        action:
    button_3_release:
      name: Config button released
      description: "Action to run when config button is released."
      default: []
      selector:
        action:
    ## Pressed Twice
    button_1_double:
      name: Down paddle pressed twice
      description: "Action to run when down paddle is pressed twice."
      default: []
      selector:
        action:
    button_2_double:
      name: Up paddle pressed twice
      description: "Action to run when up paddle is pressed twice."
      default: []
      selector:
        action:
    button_3_double:
      name: Config button pressed twice
      description: "Action to run when config button is pressed twice."
      default: []
      selector:
        action:
    ## Pressed Thrice
    button_1_triple:
      name: Down paddle pressed three times
      description: "Action to run when down paddle is pressed three times."
      default: []
      selector:
        action:
    button_2_triple:
      name: Up paddle pressed three times
      description: "Action to run when up paddle is pressed three times."
      default: []
      selector:
        action:
    button_3_triple:
      name: Config button pressed three times
      description: "Action to run when config button is pressed three times."
      default: []
      selector:
        action:
    ## Pressed Four Times
    button_1_quadruple:
      name: Down paddle pressed four times
      description: "Action to run when down paddle is pressed four times."
      default: []
      selector:
        action:
    button_2_quadruple:
      name: Up paddle pressed four times
      description: "Action to run when up paddle is pressed four times."
      default: []
      selector:
        action:
    button_3_quadruple:
      name: Config button pressed four times
      description: "Action to run when config button is pressed four times."
      default: []
      selector:
        action:
    ## Pressed Five Times
    button_1_quintuple:
      name: Down paddle pressed five times
      description: "Action to run when down paddle is pressed five times."
      default: []
      selector:
        action:
    button_2_quintuple:
      name: Up paddle pressed five times
      description: "Action to run when up paddle is pressed five times."
      default: []
      selector:
        action:
    button_3_quintuple:
      name: Config button pressed five times
      description: "Action to run when config button is pressed five times."
      default: []
      selector:
        action:
mode: queued
max_exceeded: silent
variables:
  device_id: !input "inovelli_switch"
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:
      ### Button 1 (Down Paddle)
      - conditions: "{{ command == 'button_1_press' }}"
        sequence: !input button_1
      - conditions: "{{ command == 'button_1_hold' }}"
        sequence: !input button_1_hold
      - conditions: "{{ command == 'button_1_release' }}"
        sequence: !input button_1_release
      - conditions: "{{ command == 'button_1_double' }}"
        sequence: !input button_1_double
      - conditions: "{{ command == 'button_1_triple' }}"
        sequence: !input button_1_triple
      - conditions: "{{ command == 'button_1_quadruple' }}"
        sequence: !input button_1_quadruple
      - conditions: "{{ command == 'button_1_quintuple' }}"
        sequence: !input button_1_quintuple
      ### Button 2 (Upper Paddle)
      - conditions: "{{ command == 'button_2_press' }}"
        sequence: !input button_2
      - conditions: "{{ command == 'button_2_hold' }}"
        sequence: !input button_2_hold
      - conditions: "{{ command == 'button_2_release' }}"
        sequence: !input button_2_release
      - conditions: "{{ command == 'button_2_double' }}"
        sequence: !input button_2_double
      - conditions: "{{ command == 'button_2_triple' }}"
        sequence: !input button_2_triple
      - conditions: "{{ command == 'button_2_quadruple' }}"
        sequence: !input button_2_quadruple
      - conditions: "{{ command == 'button_2_quintuple' }}"
        sequence: !input button_2_quintuple
      ### Button 3 (Config Button)
      - conditions: "{{ command == 'button_3_press' }}"
        sequence: !input button_3
      - conditions: "{{ command == 'button_3_hold' }}"
        sequence: !input button_3_hold
      - conditions: "{{ command == 'button_3_release' }}"
        sequence: !input button_3_release
      - conditions: "{{ command == 'button_3_double' }}"
        sequence: !input button_3_double
      - conditions: "{{ command == 'button_3_triple' }}"
        sequence: !input button_3_triple
      - conditions: "{{ command == 'button_3_quadruple' }}"
        sequence: !input button_3_quadruple
      - conditions: "{{ command == 'button_3_quintuple' }}"
        sequence: !input button_3_quintuple

Edit: Updated to new selector format.
Edit #2: mode single → queued

6 Likes

Are there no device triggers for this switch?

For example here’s a Philips hue button.

I guess I don’t follow…

The blueprint uses the zha_event trigger with the command attribute for activating each scene. If there’s a better way to write a blueprint, I’m open to learning.

I have the switches but have not set them up so I was curious if there were no device triggers such as the one in the screenshot for this switch. I have devices that have them and some don’t and end up requiring blueprints like this to make it easier.

Put another way, what’s in the screenshot is a regular automation, the device trigger section has the triggers for each button negating the need for a blueprint. Some devices I have don’t have any buttons mapped to device triggers and require a blueprint.

1 Like

Wow! I learned something new today. It’s been a minute since setting up automations via Home Assistant and didn’t know device triggers were a thing. You absolutely can create your automations for this switch using device triggers, no blueprint necessary. Thank you for pointing it out to me.

You’re welcome, I was just curious as I didn’t setup the switches yet if there weren’t any device triggers for the switch as I know the inovelli team thesmeves developed the zha quirk.

I just installed my first Blue switch and was hoping someone had a blueprint already, thanks!

I’m not having any luck with this - though I suspect it is from the switch end…

For testing, I’m having Config held, (up, down, config triple click) toggle a lamp. Nothing is working. When I look at the Trace, the only event that it follows to the end of the trace is “button_2_release” (Although I don’t know if that is consistent).

My overall feeling is that most events are not being received by Home Assistant.

Any one else having this problem? (FYI the switch works fine when I send it commands, and I have 3 installed - they all seem to have this behavior - specifically that the _pressed events don’t fire consistently)

FYI: I have opened a ticket with Inovelli

As far as I’m aware, scenes for Inovelli (and Zooz) switches are single button only.

Wouldn’t a Blueprint make this easier though by having all of the triggers available in 1 automation rather than having to set up a separate automation for each button press? Unless there is a way to set up 1 automation with multiple device trigger/action combinations that I’m missing?

I prefer having my scene automations for a switch in one place, so I agree with you. However, I can see the simplicity of one trigger, one automation. The editor can get really cluttered with so many scenes, especially when you start using choose and if-then.

@fxlt I am still fairly new to home assistant so maybe I’m doing something incorrectly, but I’m having an issue using the blueprint to dim a Philips Hue ceiling fixture. I have done this before with my Inovelli Red Series Dimmer to a Philips Hue outdoor light without issue and the settings on the light switch are the same. It appears the LED notification bar on the switch moves up and down based on the press and hold of the switch, but the light doesn’t react at all. Any help is greatly appreciated!

I’m sorry it isn’t working for you. Could you post the yaml for your automation?

Here you go.

alias: Bedroom Light Switch
description: ""
use_blueprint:
  path: fxlt/zha-inovelli-vzm31-sn-blue-series-2-1-switch.yaml
  input:
    inovelli_switch: 5304d25a3ed20ff58af62bdd37cd20d7
    button_2:
      - type: turn_on
        device_id: 6451c1d7f79b81e0b0edc5924fa51244
        entity_id: light.hue_flourish_ceiling_1
        domain: light
    button_1:
      - type: turn_off
        device_id: 6451c1d7f79b81e0b0edc5924fa51244
        entity_id: light.hue_flourish_ceiling_1
        domain: light
    button_1_hold:
      - device_id: 6451c1d7f79b81e0b0edc5924fa51244
        domain: light
        entity_id: light.hue_flourish_ceiling_1
        type: brightness_decrease
    button_2_hold:
      - device_id: 6451c1d7f79b81e0b0edc5924fa51244
        domain: light
        entity_id: light.hue_flourish_ceiling_1
        type: brightness_increase
    button_2_double:
      - service: scene.turn_on
        target:
          entity_id: scene.bedroom_ceiling_light_scene_night
        metadata: {}
    button_1_double:
      - service: scene.turn_on
        target:
          entity_id: scene.bedroom_ceiling_light_scene_3500k
        metadata: {}

Is the Hue bulb directly connected to the switch or on a different circuit? If directly connected, is “smart bulb” mode enabled on the switch and have you tried binding?

Yes it’s connected to the switch and the switch is in smart bulb mode. What do you mean by binding?

The automation as you currently have it written should work, assuming 5304d25a3ed20ff58af62bdd37cd20d7 is the correct device id for the switch.

If you bind the switch and bulb, you don’t need to setup on/off/dimming functions manually and they’ll “just work” even if Home Assistant is offline for whatever reason. These should get you started.

For ZHA: Binding

For Z2M: Binding

Just got my switches in today after several months on back-order. Installed and ready to go with HA, thanks for the blueprint!

Thanks for making this! Very useful. Also, from what i can see the built in automations do NOT have option for config hold, but yours does. Just pointing out a difference i noticed that makes yours superior.

Hi - so I’m hitting a bug where this is not reliably working. The trace looks like it’s just ignoring the button press and there always seems to be two consecutive ZHA events when I tap the button.

Not sure if anyone can help or tell me why this may be happening.

Edit: I switched the automation mode to queued and it works flawlessly now! I’ll make a fork.