ZWave-JS - Inovelli LZW31-SN Red-Series Dimmer

Here’s what I see when I’m listening to zwave_js_value_notification in developer tools

{
    "event_type": "zwave_js_value_notification",
    "data": {
        "domain": "zwave_js",
        "node_id": 6,
        "home_id": 4234304905,
        "endpoint": 0,
        "device_id": "57fcb584c28f8386200f9eb6e54e9cce",
        "command_class": 91,
        "command_class_name": "Central Scene",
        "label": "Scene 002",
        "property": "scene",
        "property_name": "scene",
        "property_key": "002",
        "property_key_name": "002",
        "value": 3,
        "value_raw": 3
    },
    "origin": "LOCAL",
    "time_fired": "2021-11-25T23:39:36.145531+00:00",
    "context": {
        "id": "f580cb7b9f3755480e5aaa8c33be946f",
        "parent_id": null,
        "user_id": null
    }
}

The switch is working and sending central scene commands then. To do an automation, you need to convert the json you have from the event listener to yaml

You can use this

https://www.json2yaml.com/

This automation should work, just add your action

alias: inovelli scene
description: ''
mode: single
trigger:
  - platform: event
    event_type: zwave_js_value_notification
    event_data:
      domain: zwave_js
      node_id: 6
      home_id: 4234304905
      endpoint: 0
      device_id: 57fcb584c28f8386200f9eb6e54e9cce
      command_class: 91
      command_class_name: Central Scene
      label: Scene 002
      property: scene
      property_name: scene
      property_key: '002'
      property_key_name: '002'
      value: 3
      value_raw: 3
condition: []
action:
  - device_id: ''
    domain: ''
    entity_id: ''

For some reason after I update HA yesterday, my old automations are not working and I am not able to save any new one. Anybody else met this problem?

The error in Log Details shows this,

Logger: homeassistant.setup
Source: components/device_automation/init.py:112
First occurred: 7:29:38 PM (1 occurrences)
Last logged: 7:29:38 PM

Error during setup of component automation
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/components/device_automation/init.py”, line 109, in async_get_device_automation_platform
integration = await async_get_integration_with_requirements(hass, domain)
File “/usr/src/homeassistant/homeassistant/requirements.py”, line 58, in async_get_integration_with_requirements
integration = await async_get_integration(hass, domain)
File “/usr/src/homeassistant/homeassistant/loader.py”, line 566, in async_get_integration
integration = await _async_get_integration(hass, domain)
File “/usr/src/homeassistant/homeassistant/loader.py”, line 594, in _async_get_integration
raise IntegrationNotFound(domain)
homeassistant.loader.IntegrationNotFound: Integration ‘’ not found.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/setup.py”, line 229, in _async_setup_component
result = await task
File “/usr/src/homeassistant/homeassistant/components/automation/init.py”, line 230, in async_setup
if not await _async_process_config(hass, config, component):
File “/usr/src/homeassistant/homeassistant/components/automation/init.py”, line 635, in _async_process_config
await async_validate_config_item(hass, raw_config),
File “/usr/src/homeassistant/homeassistant/components/automation/config.py”, line 86, in async_validate_config_item
config[CONF_ACTION] = await script.async_validate_actions_config(
File “/usr/src/homeassistant/homeassistant/helpers/script.py”, line 241, in async_validate_actions_config
return await asyncio.gather(
File “/usr/src/homeassistant/homeassistant/helpers/script.py”, line 298, in async_validate_action_config
choose_conf[CONF_SEQUENCE] = await async_validate_actions_config(
File “/usr/src/homeassistant/homeassistant/helpers/script.py”, line 241, in async_validate_actions_config
return await asyncio.gather(
File “/usr/src/homeassistant/homeassistant/helpers/script.py”, line 256, in async_validate_action_config
platform = await device_automation.async_get_device_automation_platform(
File “/usr/src/homeassistant/homeassistant/components/device_automation/init.py”, line 112, in async_get_device_automation_platform
raise InvalidDeviceAutomationConfig(
homeassistant.components.device_automation.exceptions.InvalidDeviceAutomationConfig: Integration ‘’ not found

This doesnt seem to be an issue related to device blueprints. You may want to try posting in the general discussion forum.
From what I see, the automation component is borked in your install. I’d restore back to the previous version if you havent fixed this already.

@jerelabs you may want to change “zwave_device” to “zwavejs_device” in the blueprint.

1 Like

I replaced the logbook service section in the blueprint with this:

- service: logbook.log
  data:
    name: '{{ this.attributes.friendly_name }}'
    message: >
      {% if button_id == "001" %}
        Off
      {% elif button_id == "002" %}
        On
      {% elif button_id == "003" %}
        Config
      {% endif %}
      {{ press_count }}

In the logbook I get a message like “Inovelli Switch Scenes On KeyPressed2x”

2 Likes

I have a 3 way setup using an aux switch with lzw31, I can program the aux switch up and down by adding; adding here for reference

    ## AUX Pressed
    button_aux_up:
      name: Aux Switch Up
      description: "Action to run, when the aux switch's button is pressed up."
      default: []
      selector:
        action: {}
    button_aux_down:
      name: Aux Switch Down
      description: "Action to run, when the aux switch's button is pressed down."
      default: []
      selector:
        action: {}

and

    - conditions: '{{ button_id == "004" and press_count == 0 }}'
      sequence: !input button_aux_up
    - conditions: '{{ button_id == "005" and press_count == 0 }}'
      sequence: !input button_aux_down
2 Likes
action:
  - variables:
      button_id: "{{ trigger.event.data.property_key_name }}"
      press_count: "{{ trigger.event.data.value }}"

button_id and press_count are defined as variables, but zwave_device is not.

  - 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 }}"

Since a triggered automation is logged in the logbook already, I just removed all these lines from the blueprint. Here is another solution if you would prefer to log something in the logbook: ZWave-JS - Inovelli LZW31-SN Red-Series Dimmer - #38 by kliph

@SSinSD Thanks for sharing this and for posting a response in my other thread. Wasn’t sure the error was related to this blueprint.

Just to clarify, which lines specifically did you remove?

Just these? Or the action section above it too?

Did you replace all three of the logbook service sections with this single replacement?

Yes, just those lines. The lines in the section above defining the variables are needed for the blueprint to function. The lines in the second section for logbook entries are not required for the blueprint to function, so I just took them out.

1 Like

Thanks for the clarification. I just hashed out those three sections and restarted HA, but I am still seeing the “Template variable warning: ‘zwave_device’ is undefined when rendering '{{ zwave_device }}” warning in my logs.

Any other ideas for what else needs to be done to resolve or at least isolate what’s causing it?

@jerelabs doesn’t look like he has been around in a while, so I took the code and threw in my own github and created an import button since I’ve been sharing this so much:

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

Let me know if there are issues, and please @ me if there are changes to the original code and I’d be more than happy to update.

How do you create one automation for this to handle all switches? I have this as my automation, but want it to do this for all switches:

alias: New Automation
description: ''
use_blueprint:
  path: mikemsd/inovelli_red_on_off_or_dimmer_scenes_zwavejs.yaml
  input:
    inovelli_switch: 720e80ad78f16ed5453fd5b8a702108c
    up_x2_action:
      - type: turn_on
        device_id: 720e80ad78f16ed5453fd5b8a702108c
        entity_id: light.upstairs_living_room
        domain: light

This blueprint wouldn’t work for this. You would need individual automations per switch.

My recommendation is to listen to the zwave_js_value_notification events and find the common filters that you can specify in the event data. You need to narrow it down to the event data that only the Inovelli’s would produce.

Also, Node Red would be an excellent solution for your use case, just saying.

I agree about Node Red - that’s how I manage all my Inovelli scenes and atuomations. Here’s a sample flow you can import and change - you just need to add call service nodes to trigger what you want to happen with the various taps/scenes.

[{"id":"925ec5e7ea994e90","type":"server-events","z":"65d4f7b6aa8e19da","name":"Zwave Events Other","server":"","version":1,"event_type":"zwave_js_value_notification","exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"waitForRunning":true,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"$outputData(\"eventData\").event_type","valueType":"jsonata"},{"property":"event_type","propertyType":"msg","value":"$outputData(\"eventData\").event_type","valueType":"jsonata"}],"x":150,"y":840,"wires":[["c7e3a081298c2954","3250fbc1292efa9d"]]},{"id":"3250fbc1292efa9d","type":"switch","z":"65d4f7b6aa8e19da","name":"Node 51","property":"payload.event.node_id","propertyType":"msg","rules":[{"t":"eq","v":"51","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":340,"y":740,"wires":[["7ca5291a9184514e","70e71f3c24268bb8","83d36c8829db740a"]]},{"id":"c7e3a081298c2954","type":"switch","z":"65d4f7b6aa8e19da","name":"Node 17","property":"payload.event.node_id","propertyType":"msg","rules":[{"t":"eq","v":"17","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":340,"y":900,"wires":[["f5656230529ce5d1"]]},{"id":"f5656230529ce5d1","type":"switch","z":"65d4f7b6aa8e19da","name":"Up or down?","property":"payload.event.property_key","propertyType":"msg","rules":[{"t":"eq","v":"001","vt":"str"},{"t":"eq","v":"002","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":530,"y":900,"wires":[["57244fa9dea23322"],["06f89851c5152dc2","c22bc49a4786b11a"]]},{"id":"57244fa9dea23322","type":"switch","z":"65d4f7b6aa8e19da","name":"Taps?","property":"payload.event.value","propertyType":"msg","rules":[{"t":"eq","v":"KeyPressed3x","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":730,"y":900,"wires":[[]]},{"id":"06f89851c5152dc2","type":"switch","z":"65d4f7b6aa8e19da","name":"Taps?","property":"payload.event.value","propertyType":"msg","rules":[{"t":"eq","v":"KeyPressed3x","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":730,"y":960,"wires":[[]]},{"id":"c22bc49a4786b11a","type":"switch","z":"65d4f7b6aa8e19da","name":"Hold Down","property":"payload.event.value","propertyType":"msg","rules":[{"t":"eq","v":"KeyHeldDown","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":730,"y":1020,"wires":[[]]},{"id":"930a78d960e1259e","type":"switch","z":"65d4f7b6aa8e19da","name":"Taps?","property":"payload.event.value","propertyType":"msg","rules":[{"t":"eq","v":"KeyPressed","vt":"str"},{"t":"eq","v":"KeyPressed2x","vt":"str"},{"t":"eq","v":"KeyPressed3x","vt":"str"}],"checkall":"true","repair":false,"outputs":3,"x":750,"y":820,"wires":[[],[],[]]},{"id":"e4f592937c3fc17e","type":"switch","z":"65d4f7b6aa8e19da","name":"Taps?","property":"payload.event.value","propertyType":"msg","rules":[{"t":"eq","v":"KeyPressed","vt":"str"},{"t":"eq","v":"KeyPressed2x","vt":"str"},{"t":"eq","v":"KeyPressed3x","vt":"str"},{"t":"eq","v":"KeyPressed4x","vt":"str"},{"t":"eq","v":"KeyPressed5x","vt":"str"}],"checkall":"true","repair":false,"outputs":5,"x":770,"y":740,"wires":[[],[],[],[],[]]},{"id":"70e71f3c24268bb8","type":"switch","z":"65d4f7b6aa8e19da","name":"Scene Down","property":"payload.event.property_key","propertyType":"msg","rules":[{"t":"eq","v":"001","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":570,"y":800,"wires":[["930a78d960e1259e"]]},{"id":"7ca5291a9184514e","type":"switch","z":"65d4f7b6aa8e19da","name":"Scene Up","property":"payload.event.property_key","propertyType":"msg","rules":[{"t":"eq","v":"002","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":560,"y":740,"wires":[["e4f592937c3fc17e"]]},{"id":"83d36c8829db740a","type":"switch","z":"65d4f7b6aa8e19da","name":"Scene Button","property":"payload.event.property_key","propertyType":"msg","rules":[{"t":"eq","v":"003","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":580,"y":700,"wires":[[]]}]

I would also checkout this Node Red Palette for additional functions for the Inovelli Switches in Node Red

The automation “Inovelli Multiswitch” (automation.inovelli_multiswitch ) has an action that calls an unknown service: logbook.log .

Any chance the code will get updated to fix this issue? I tried commenting out sections like @SSinSD recommended without luck. Help? :slight_smile:

This works on my installation without error. Perhaps you don’t have recorder and/or logbook enabled/turned on?

would this blueprint work with the blue series?

Is this still working for everyone? I’m on 2022.12.x and just tried this (and the other one shared in the thread) and it triggers all the button presses every time i activate a scene.

So for example I have it set to press down 3 times is turn off all lights and press up twice is turn on all lights, and if i press up twice it runs both automations. When I had 3 automations, it ran all 3, every time. yes i have logbook and recorder enabled.