ZWave-JS Inovelli LZW36 Fan Switch/Dimmer

Here is a blueprint for the Inovelli LZW36 Fan controller. The blueprint is a copy of the work done by @jerelabs and @troy, adjusted for the unique buttons and rockers of the fan switch.

Blueprint

Click the badge to import this Blueprint: (needs Home Assistant Core 2021.3 or higher)

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

Or import this Blueprint by using the forum topic URL:

blueprint:
  name: Inovelli Red Series LZW36 Fan Controller (ZWave-JS)
  description: Create automations for the Inovelli Fan/Switch combo
    the ZWave-JS integration.
  domain: automation
  input:
    inovelli_fan_switch:
      name: Inovelli Fan Controller
      description: List of available Inovelli LZW36 dimmer combos.
      selector:
        device:
          integration: zwave_js
          manufacturer: Inovelli
          model: LZW36
    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: {}
    button_a_held:
      name: Button A - Up/On held down
      description: Action to run, when the button is held down.
      default: []
      selector:
        action: {}
    button_b_held:
      name: Button B - Down/Off held down
      description: Action to run, when the button is held down.
      default: []
      selector:
        action: {}
    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: {}
    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: {}
    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: {}
    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: {}
    button_c1:
      name: Button C - Up/Increase (Top)
      description: Action to run, when the light rocker is pressed up.
      default: []
      selector:
        action: {}
    button_c2:
      name: Button C - Down/Decrease (Top)
      description: Action to run, when the light rocker is pressed down.
      default: []
      selector:
        action: {}
    button_d1:
      name: Button D - Up/Increase (Bottom)
      description: Action to run, when the fan rocker is pressed up.
      default: []
      selector:
        action: {}
    button_d2:
      name: Button D - Down/Decrease (Bottom)
      description: Action to run, when the fan rocker is pressed down.
      default: []
      selector:
        action: {}
  source_url: https://github.com/cree8/inovelli_switches/edit/main/blueprint_lzw36.yaml
mode: single
max_exceeded: silent
variables:
  device_id: !input 'inovelli_fan_switch'
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 }}'
    device_name: !input inovelli_fan_switch
- 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: '{{ device_name }}'
- choose:
  - 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 == "KeyHeldDown" }}'
    sequence: !input 'button_a_held'
  - conditions: '{{ button_id == "001" and press_count == "KeyHeldDown" }}'
    sequence: !input 'button_b_held'
  - 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'
  - conditions: '{{ button_id == "003" and press_count == "KeyPressed" }}'
    sequence: !input 'button_c1'
  - conditions: '{{ button_id == "004" and press_count == "KeyPressed" }}'
    sequence: !input 'button_c2'
  - conditions: '{{ button_id == "005" and press_count == "KeyPressed" }}'
    sequence: !input 'button_d1'
  - conditions: '{{ button_id == "006" and press_count == "KeyPressed" }}'
    sequence: !input 'button_d2'
4 Likes

Thank you for this!

I can’t get it to function though. I’ve got it set to turn on another light when I double tap button A. The automation says that it’s triggered, but nothing happens. Any thoughts?

alias: Inovelli Red Series LZW36 Fan Controller (ZWave-JS)
description: ''
use_blueprint:
  path: cree8/zwave-js-inovelli-lzw36-fan-switch-dimmer.yaml
  input:
    inovelli_fan_switch: 86ca4c5165f2f84c8b8dda14ae8c51cb
    button_a2:
      - type: turn_on
        device_id: 84d20dd6beceb958b68d12ca4ac88af4
        entity_id: switch.base_model_on_off_switch_2
        domain: switch
    button_b2:
      - type: turn_off
        device_id: 84d20dd6beceb958b68d12ca4ac88af4
        entity_id: switch.base_model_on_off_switch_2
        domain: switch

Looks like a bug in Home Assistant.

1 Like

Impressive response time, and makes total sense due to the fact that the script watches for the string from those events.
I guess a temporary workaround would be to use the raw_value they speak of, but I believe the fix will be pulled soon enough.

Awesome, thank you! When blueprints were first announced I wasn’t too excited about them because most of my automations are “mature,” but you just saved me so much effort and made it so much cleaner than I would.

1 Like

It’s showing that was fix in 2021.3.1, I’m on 2021.3.4 and my LZW31-SN switches are working (I’m not sure if they were working under this bug), but the LZW36 button presses aren’t working. How can I troubleshoot this?

Looks like the latest update has completely broken this blueprint?

What problems are you experiencing?
I am running the latest update and I am able to create new automations based on the blueprint and also edit my existing blueprint linked to the switch.

I’ll try them again, but it was straight up not recording any button presses. I’ll let you know.

Yeah it’s still not working. Are you using the z-wave JS or the zwavejs2mqtt? I’m using zwavejs2mqtt which was working before it was pulled, readded, and this latest update. I’m not sure exactly which one “broke” it.

In the logs of zwavejs2mqtt I do see 2021-04-08 10:20:49.515 INFO ZWAVE: Node 28: value notification: 91-0-scene-002 3 when I press the scene.

Yep I can confirm as well. Looks like the syntax changed. Let me see what I can find

1 Like

I haven’t had a chance to really look into yet but updated earlier and noticed my fan switch is unavailable… light seems to be ok …

Unavailable? Or just non functional? Two different causes for the two.

Unavailable… which is making it non functional… if that makes sense :sweat_smile:

Ok. You’ll likely have to begin with troubleshooting the device in zwave_js itself as the blueprint has no impact on that

Sorry I was mentioning thinking that’s why the user mentioning the blueprint not working was having issues… I was suggesting the blueprint wasn’t working because the fan entity is unavailable sorry, I don’t use blueprints myself.

Edit: so I just looked previously the fan came up as a light entity… now it is a fan entity automatically, so my template fan is no longer needed. That is new to me with this last update 2021.4.1… and it was renamed its default name

1 Like

Try now. Looks like they had to rename the event trigger name due to upstream changes.

1 Like

Yep, it’s working now. Thanks.

1 Like

Has anyone else ran into issue with automations from this blueprint stemming from the latest update?

This blueprint refers to the buttons as A, B, C, and D, but doesn’t say which is which. The LZW36 installation document labels the buttons A, B, D, and E, with C and F as the LED strips.