Inovelli LZW30 Red-Series Switch using the new ZWave-JS Integration

Based on the OZW blueprint by @troy

This is a blueprint for triggering actions based on presses of the On/Off/Config buttons of the Inovelli LZW30 Red-Series Switch using the new ZWave-JS Integration.

blueprint:
  name: Inovelli Red Series LZW30-SN Switch (ZWave-JS)
  description: Create automations for the Inovelli Red Series LZW30-SN Switch using the ZWave-JS integration. 
  domain: automation
  input:
    zwave_device:
      name: Inovelli Switch
      description: "List of available inovelli LZW30-SN switch."
      selector:
          device:
            integration: zwave_js
            manufacturer: Inovelli
            model: LZW30-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 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 zwave_device
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 == "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
8 Likes

The name still reflects LZW31-SN which makes it hard to differentiate in blueprints from the LZW31-SN blueprint. :slight_smile:

Fixed - thanks for the call out.

1 Like

Quick h/t for this blueprint - after a) a full week bragging to Wife about how these LZW30-SN switches would solve world hunger and b) 24 hours of post-install panic-searching and config-test-fail cycles, this blueprint worked perfectly.

@kylerw - only thing missing is the long-press trigger - would be nice to dim/brighten a light group. I briefly looked into adding this, but I’m a blueprint newb and was quickly confused. I tried using @Khalos blueprint that has the long-press defined, but my LZW30s don’t show up in the entity dropdown. In any case, easy add?

The Switch doesn’t support long press. You need the dimmer for that.

Suddenly this blueprint is telling me that trigger is not defined.

Any thoughts? It was working perfectly until it decided to not work anymore.

Error while executing automation automation.scene_controller_kitchen: UndefinedError: 'trigger' is undefined

Heh - right. Of course. I knew that. Upgrading blueprint review to A+ status - thanks again.

1 Like

Quick heads up…I’m on the beta for the April 2021 release and this was broken…the event name appears to have been changed to: zwave_js_value_notification. I changed the event name to that and things appeared to be working. I have a feeling this may break alot of things (My wallmote also isn’t working). This may be more of a zwavejs update than the HA. Anyway if it hits anyone, that’s what may be going on.

1 Like

@Joe_Farro just came here to post the same… have spent the last 8 hours trying to get my Inovelli’s back in working condition. I’ve poked around @kylerw’s blueprint and can’t find where to make this change… can you point me in the right direction?

edit found it, and previous edit was wrong - the fix is changing line 88 in this blueprint from:

    event_type: zwave_js_event

to:

  event_type: zwave_js_value_notification

Reloaded Automations and switches are back in action.

1 Like

Sorry Badmin, just saw this. Yep that was where to change it. It broke my Aeotec wallmote also, so I have a feeling we’re going to have blueprintgeddon essentailly. Glad you found it and posted it, I should’ve did that myself and will next time.

1 Like

Blueprintgeddon = funny / not funny (b/c it’s true). Would have been nice if this change would have a) updated the labels in question, and b) flagged the blueprint owners of the related change (considering the fork in labels to include _value and straight _notification, might not have been possible). Not that I’m complaining (much) - this opensource platform beats my previous "Smart"Things and pre-previous Wink experience, hands down. I’m shocked and awed on the regular, in a good way.

1 Like

Yep, they do a lot of things right, and it’s incredibly powerful. Breaking changes could still use some work. I think that they’ve gotten much better on the core front, and tools like the config checker help immensely, but blueprints I think are still fairly new. Hoping they get better on that part.

I’ve been on HA for about 2 years, and the improvements and features such as blue prints are really leaps ahead of where it was…so they’re improving quickly.

EIther way, glad we got it figured out and turned around quickly. I’m super happy with my inovelli switches combined with this blueprint. I also learned you can use setconfig to change the LED color, so just have to come up with what I want to tie that status color too

1 Like

My next Inovelli project = RGB notification based on ‘garage open >30 min’ events. That said I just lost a day arguing with an Inovelli Red Dimmer failed install - trying to get one working in a non-neutral (=Aeotec Bypass) setup. Two different switches, two different bypasses, just can’t get it working. Will give it another go this weekend.

Thanks, all. Edit made in OP.

2 Likes

have you seen this: https://github.com/kschlichter/Home-Assistant-Inovelli-Red-Dimmer-Switch

2 Likes

Perfect - pure gold! Much appreciated @kylerw!

They do support long press. In Z-Wave JS the data value is “KeyHeldDown”. You can also utilize the “KeyReleased” value to make the switch act as a dimmer to other bulbs. I’m doing this with my first gen Inovelli scene enabled switch, as well as my Red series switches.

Interesting… I didn’t realize this. Theoretically, then, the switch and dimmer could use the same blueprint, I believe…

I’m not very familiar with how blueprints work from a setup standpoint, but there would need to be some difference to allow which switch is selectable, right? If I select this blueprint I’m unable to add any device that is not and on/off Red series switch.
Otherwise, yes, the commands and scene data appear to be the same. For more info you can check the scene details here, although the data provided isn’t Z-wave JS, it gets you an idea of what’s available.

Is there a way to simulate a scene press action (ie up button 2 times) from an automation?