Z2M - Inovelli Blue Series 2-in-1 switch + dimmer

Here’s my work-in-progress blueprint for the Inovelli Blue Series switch, model VZM31-SN for use with Zigbee2MQTT. This exposes all the button combinations for you to do with what you please. For example, double press down to turn off every light in the house. Press and hold up to slowly turn the brightness of the entire room up until you release the button. Have fun. Check out my other blueprint for some tips if you need help: Zigbee2Mqtt - IKEA five button remote

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

blueprint:
  name: Z2M - Inovelli 2-in-1 switch + dimmer Scene Controls 
  description: |
    For Inovelli Blue Series 2-in-1 switch + dimmer, model VZM31-SN
    Allows setting a few different actions such as 2,3,4,5 clicking the up/down and config buttons.

  domain: automation
  input:
    switch:
      name: Switch
      description: Inovelli Switch (action). For example, "sensor.INOVELLI_SWITCH_action"
      selector:
        entity:
          domain: sensor
    config_held:
      name: Hold Config
      description: Action to run
      default: []
      selector:
        action:
    config_release:
      name: Release Config
      description: Action to run
      default: []
      selector:
        action:
    config_single:
      name: Single Click Config
      description: Action to run
      default: []
      selector:
        action:
    config_double:
      name: Double Click Config
      description: Action to run
      default: []
      selector:
        action:
    config_triple:
      name: 3x Click Config
      description: Action to run
      default: []
      selector:
        action:
    config_quadruple:
      name: 4x Click Config
      description: Action to run
      default: []
      selector:
        action:
    config_quintuple:
      name: 5x Click Config
      description: Action to run
      default: []
      selector:
        action:
    down_held:
      name: Hold Down
      description: Action to run
      default: []
      selector:
        action:
    down_release:
      name: Release Down
      description: Action to run
      default: []
      selector:
        action:
    down_single:
      name: Single Click Down
      description: This will trigger an/some action(s), but also, it will probably turn off the switch locally.
      default: []
      selector:
        action:
    down_double:
      name: Double Click Down
      description: Action to run
      default: []
      selector:
        action:
    down_triple:
      name: 3x Click Down
      description: Action to run
      default: []
      selector:
        action:
    down_quadruple:
      name: 4x Click Down
      description: Action to run
      default: []
      selector:
        action:
    down_quintuple:
      name: 5x Click Down
      description: Action to run
      default: []
      selector:
        action:
    up_held:
      name: Hold Up
      description: Action to run
      default: []
      selector:
        action:
    up_release:
      name: Release Up
      description: Action to run
      default: []
      selector:
        action:
    up_single:
      name: Single Click Up
      description: This will trigger an/some action(s), but also, it will probably turn on the switch locally.
      default: []
      selector:
        action:
    up_double: 
      name: Double Click Up
      description: Action to run
      default: []
      selector:
        action:
    up_triple:
      name: 3x Click Up
      description: Action to run
      default: []
      selector:
        action:
    up_quadruple:
      name: 4x Click Up
      description: Action to run
      default: []
      selector:
        action:
    up_quintuple:
      name: 5x Click Up
      description: Action to run
      default: []
      selector:
        action:



mode: parallel
max_exceeded: silent


trigger:
  - platform: state
    entity_id: !input switch

action:
  - variables:
      command: "{{ trigger.to_state.state }}"
  - choose:
      - conditions:
          - "{{ command == 'config_double' }}"
        sequence: !input config_double
      - conditions:
          - "{{ command == 'config_held' }}"
        sequence: !input config_held
      - conditions:
          - "{{ command == 'config_quadruple' }}"
        sequence: !input config_quadruple
      - conditions:
          - "{{ command == 'config_quintuple' }}"
        sequence: !input config_quintuple
      - conditions:
          - "{{ command == 'config_release' }}"
        sequence: !input config_release
      - conditions:
          - "{{ command == 'config_single' }}"
        sequence: !input config_single
      - conditions:
          - "{{ command == 'config_triple' }}"
        sequence: !input config_triple
      - conditions:
          - "{{ command == 'down_double' }}"
        sequence: !input down_double
      - conditions:
          - "{{ command == 'down_held' }}"
        sequence: !input down_held
      - conditions:
          - "{{ command == 'down_quadruple' }}"
        sequence: !input down_quadruple
      - conditions:
          - "{{ command == 'down_quintuple' }}"
        sequence: !input down_quintuple
      - conditions:
          - "{{ command == 'down_release' }}"
        sequence: !input down_release
      - conditions:
          - "{{ command == 'down_single' }}"
        sequence: !input down_single
      - conditions:
          - "{{ command == 'down_triple' }}"
        sequence: !input down_triple
      - conditions:
          - "{{ command == 'up_double' }}"
        sequence: !input up_double
      - conditions:
          - "{{ command == 'up_held' }}"
        sequence: !input up_held
      - conditions:
          - "{{ command == 'up_quadruple' }}"
        sequence: !input up_quadruple
      - conditions:
          - "{{ command == 'up_quintuple' }}"
        sequence: !input up_quintuple
      - conditions:
          - "{{ command == 'up_release' }}"
        sequence: !input up_release
      - conditions:
          - "{{ command == 'up_single' }}"
        sequence: !input up_single
      - conditions:
          - "{{ command == 'up_triple' }}"
        sequence: !input up_triple

edited the order of inputs

Added missing import button

3 Likes

Thanks for sharing! I got this working but had to remove line #150 (attribute: action). My blue switches don’t report state under that attribute.

1 Like

Ah, yes, that may be the Z2M setting “Home Assistant legacy entity attributes” I have enabled still. I’ll take that line out, too. Thanks!

This is great, thank you! Any chance you could order the commands more logically, something like Hold Config, Release Config, Config x1, Config x2, Config x3, Config x4…, Hold Up, Release Up, Up x1, Up x2 … ? It’s really hard to find the command you’re looking for currently.

Thanks!

1 Like

@smenzer Good feedback! I sorted them in VS code alphabetically, and that’s probably not the best way to do that. I like your idea much better.

Looks much better, thank you very much!

Thanks OP for creating this blueprint. Apologies for the noob question. I’ve only ever used blueprints where I can import them and customize them in the UI. If I understand correctly, I’m supposed to copy and paste the above yaml into an automation by selecting “Edit in YAML”, correct?

I already have the switch working directly via direct bind with some bedside lamps in Z2M. What I’m trying to do is just use OPs script so that when I double tap on the switch, some accent lighting turns on or off.

However, despite adding my switch name, the sensor.dimmer_switch_action, and the action for ONLY the double up and double down, I’m getting an error Message malformed: required key not provided @ data['action''] – Does this mean I need to map every button press not just the one I’m trying to enhance?

Any chance someone can provide some help or an example so I can better understand how this works? Thanks

Hey @ThatTallGuy, I did forget to include the markdown for the “import” button in my post, it is there now! I would go ahead and create the blueprint using that versus the Edit As Yaml method you mentioned, then create the automation using that blueprint.

I’m including a screenshot of what my automation looks like from the blueprint. After you re-create both your blueprint and automation, let me know if you see something similar to this.

Hopefully this also fixes your error message.

That did the trick! Super easy to configure now. Thanks a ton!

1 Like