Control LEDs and LED Effects on Inovelli Black, Red, and Blue Devices by Floor, Area, Group, Device ID, or Entity

See if that works for you. I know I fixed the script but I don’t use the blueprint.

I think she works!

One last question for you experts…I’m starting to use this amazing script because of the recent update to node red (read: ‘broken’).

I have a flow in node red that looks like this (see below). It seems to be much faster than this script. Any idea why? Should I run three scripts in parallel - one for each series of red switch sort of like I’m doing below? (the two reddish/brown nodes are the old inovelli-notification-manager nodes)

My script will run through your three groups in series. Each device type has different parameter names and values so they can’t be done together. You’d have to make three calls to my script—one with each group—and let them run in parallel as well.

I’ve never tried to optimize my code. I’m sure there’s a good list of things I could do. I haven’t found a need to speed things up though, and I have a few other features I’d like to add so I’m more focused on those for now. I’m open to pull requests if you figure anything out. :slight_smile:

I’m back at this again, but I feel like perhaps I’m missing something really basic. I’m trying to add this as an action to a few automations to replace the multiple steps I do each time in a current automation. For example, when the dishwasher turns on, chase the switch next to it with a green bar. This works, but it would be a lot cleaner to have a script action where I just fill in the 4 parameters:

choose:
  - conditions:
      - condition: trigger
        id:
          - dishwasher-on
    sequence:
      - device_id: 65516aad856232182a3108d7c73e90e1
        domain: zwave_js
        type: set_config_parameter
        endpoint: 0
        parameter: 16
        bitmask: 255
        subtype: "16[0xff] on endpoint 0 (LED Indicator: Effect Color) on endpoint 0"
        value: 75
      - device_id: 65516aad856232182a3108d7c73e90e1
        domain: zwave_js
        type: set_config_parameter
        endpoint: 0
        parameter: 16
        bitmask: 65280
        subtype: >-
          16[0xff00] on endpoint 0 (LED Indicator: Effect Brightness) on
          endpoint 0
        value: 10
      - device_id: 65516aad856232182a3108d7c73e90e1
        domain: zwave_js
        type: set_config_parameter
        endpoint: 0
        parameter: 16
        bitmask: 16711680
        subtype: >-
          16[0xff0000] on endpoint 0 (LED Indicator: Effect Duration) on
          endpoint 0
        value: 255
      - device_id: 65516aad856232182a3108d7c73e90e1
        domain: zwave_js
        type: set_config_parameter
        endpoint: 0
        parameter: 16
        bitmask: 2130706432
        subtype: >-
          16[0x7f000000] on endpoint 0 (LED Indicator: Effect Type) on endpoint
          0
        value: 2

The script looks like this right now:

alias: Inovelli LED Control
use_blueprint:
  path: kschlichter/inovelli_led_blueprint.yaml
  input:
    entity: []
    floor: []
    area: []
    group: []
    device: []
description: ""
icon: mdi:led-off

To test this out, on the actions tab, I have this:

action: script.inovelli_led_control
data:
  entity: light.kitchen_peninsula
  effect: chase
  brightness: 10
  color: red

I click perform action, I get a green check mark, but nothing is happening to the switch. If I go into the script and set those values (entity, effect, brightness and color), then save it and run the script, the switch changes. Am I doing something wrong when trying to call it?

Thanks!

Thanks for sticking with it and continuing to try my script! You need to define a duration in my blueprint. It defaults to off so you can call it with no settings to clear an effect and so it has a reasonable way to “fail” if something is missed. That’s also why you’re getting the green check mark—it’s valid to leave it blank. That isn’t obvious and it’s easy to miss.

By using the set_config_parameter method to set those three settings it’s using whatever value was already in the duration field. That’s why it works. It’s unpredictable though, unless you never set an effect on that dimmer with a different duration.

Anyway, I’ve checked it in my bank of lab dimmers and reproduced exactly what you’re seeing. Add this last line and it’ll get you going:

action: script.inovelli_led_control
data:
  entity: light.kitchen_peninsula
  effect: chase
  brightness: 10
  color: red
  duration: Forever

I just tried it with this same setup, and I’m still not seeing any change on the switch (either to the LED, or to the parameters under Device > Configure). I tried a few other of my Reds, and the same thing.

When I tried it on a Blue series, I did get a red x on the button and “unknown error” though, with this showing in my logs:

Inovelli LED Control: Repeat at step 2: Choose at step 6: default: Choose at step 3: choice 1: Repeat at step 2: Error executing script. Unexpected error for call_service at pos 1: invalid literal for int() with base 10: ''
Inovelli LED Control: Repeat at step 2: Choose at step 6: default: Choose at step 3: choice 1: Error executing script. Unexpected error for repeat at pos 2: invalid literal for int() with base 10: ''
Inovelli LED Control: Repeat at step 2: Choose at step 6: default: Error executing script. Unexpected error for choose at pos 3: invalid literal for int() with base 10: ''
Inovelli LED Control: Repeat at step 2: Error executing script. Unexpected error for choose at pos 6: invalid literal for int() with base 10: ''
Inovelli LED Control: Error executing script. Unexpected error for repeat at pos 2: invalid literal for int() with base 10: ''

Curiouser and curiouser. Let’s focus on the Reds first.

  1. Run the script again from “Developer Tools” (left-hand nav bar) → “Actions” (horizontal menu) and send me the yaml version of what you’re calling, just like you were doing before.
  2. Go to “Settings” (left-hand nav bar) → “Automations & Scenes” → “Scripts” (horizontal menu at the top) → select the script (whatever you named it).
  3. Click “Traces” (upper-right corner).
  4. Find each service call in the left column. They’ll look like this:
    image
  5. Click the service call, scroll back to the top, and send me the call under “step details”.
  6. Repeat that for each service call.
  7. All the way back up at the top, click the top bubble in the left column and then “changed variables” in the bottom half of the column on the right. Send the top of that (everything before color_set:) and the bottom (from floor: invalid down).

For me, it looks like this:
Service call from “Actions”:

action: script.inovelli_led
data:
  effect: Chase Medium
  brightness: 10
  color: Red
  duration: Forever
  entity:
    - light.lzw31sn_500dimmer

There was only one service call in the trace, way at the bottom:

Executed: December 8, 2024 at 1:43:17 PM
Result:
params:
  domain: zwave_js
  service: bulk_set_partial_config_parameters
  service_data:
    entity_id:
      - light.lzw31sn_500dimmer
    parameter: 16
    value: 50268672
  target: {}
running_script: false

Changed variables top:

this:
  entity_id: script.inovelli_led
  state: 'off'
  attributes:
    last_triggered: '2024-12-08T14:42:56.273765+00:00'
    mode: parallel
    current: 0
    max: 100
    friendly_name: Inovelli LED Settings and Effects
  last_changed: '2024-12-08T21:43:05.858628+00:00'
  last_reported: '2024-12-08T21:43:05.858628+00:00'
  last_updated: '2024-12-08T21:43:05.858628+00:00'
  context:
    id: 01JEM3KRC209N1C70R79AJJNSM
    parent_id: null
    user_id: null
effect: chase medium
brightness: 10
color: red
duration: forever
entity:
  - light.lzw31sn_500dimmer

changed variables bottom:

floor: invalid
area: invalid
group: invalid
device: invalid
entities_from_floor: []
entities_from_area: []
entities_from_group: []
entities_from_device: []
entities_from_entity:
  - light.lzw31sn_500dimmer
all_selected_entities:
  - light.lzw31sn_500dimmer
context:
  id: 01JEM3M3G18E5BM6MJSG5J0YTA
  parent_id: null
  user_id: 0fde3f07079c4ffb9a19109e66b667d7
LEDnumber: all
LEDcolor: no change
LEDcolor_off: no change
LEDbrightness: 11
LEDbrightness_off: 11

1:

data:
  entity: 
   - light.kitchen_peninsula
  duration: forever
  effect: Chase
  brightness: 10
  color: red
action: script.inovelli_led_control

Service Call #1:

Executed: December 8, 2024 at 1:58:41 PM
Result:
params:
  domain: zwave_js
  service: set_config_parameter
  service_data:
    entity_id:
      - light.kitchen_peninsula
    parameter: 'LED Indicator: Effect Type'
    value: 255
  target: {}
running_script: false

Service Call #2 (in the same “tree”):

Executed: December 8, 2024 at 1:58:41 PM
Result:
params:
  domain: zwave_js
  service: set_config_parameter
  service_data:
    entity_id:
      - light.kitchen_peninsula
    parameter: 'LED Indicator: Effect Duration'
    value: 0
  target: {}
running_script: false

7:
When I click on the top button in the left column, I don’t have any changed variables:

When I click on the top/ top icon, I do. Top:

this:
  entity_id: script.inovelli_led_control
  state: 'off'
  attributes:
    last_triggered: '2024-12-08T16:24:24.774917+00:00'
    mode: parallel
    current: 0
    max: 100
    icon: mdi:led-off
    friendly_name: Inovelli LED Control
  last_changed: '2024-12-08T16:24:43.284213+00:00'
  last_reported: '2024-12-08T16:24:43.284213+00:00'
  last_updated: '2024-12-08T16:24:43.284213+00:00'
  context:
    id: 01JEKHCSGM8HTZ2X1MG0MKMBBJ
    parent_id: null
    user_id: null
entity:
  - light.kitchen_peninsula

bottom:


floor: []
area: []
group: []
device: []
entities_from_floor: []
entities_from_area: []
entities_from_group: []
entities_from_device: []
entities_from_entity:
  - light.kitchen_peninsula
all_selected_entities:
  - light.kitchen_peninsula
context:
  id: 01JEM4GA0CFT5SHESVR7YXW6FP
  parent_id: null
  user_id: fb3217eb6091454291bdd4281738e0c4
LEDnumber: all
LEDcolor: no change
LEDcolor_off: no change
LEDbrightness: 11
LEDbrightness_off: 11

Somewhere in the trace’s changed variables it should have the variables for the effect.

effect: chase medium
brightness: 10
color: red
duration: forever

Something must be set to ‘invalid’ still. Your call works perfectly for me though, so I can’t imagine what it is. I’ve made some updates to the script in the last month. Can you double check that you’re using the current version?

I just stepped through each step in the trace with the Changed Variables tab open. The only item with data on that tab is the initial one:

image

I do see ‘invalid’ in there, but is that what you’re referring to? (Larger paste of the top part)

this:
  entity_id: script.inovelli_led_control
  state: 'off'
  attributes:
    last_triggered: '2024-12-08T21:58:41.421533+00:00'
    mode: parallel
    current: 0
    max: 100
    icon: mdi:led-off
    friendly_name: Inovelli LED Control
  last_changed: '2024-12-08T21:58:41.579610+00:00'
  last_reported: '2024-12-08T21:58:41.579610+00:00'
  last_updated: '2024-12-08T21:58:41.579610+00:00'
  context:
    id: 01JEM4GA0CFT5SHESVR7YXW6FP
    parent_id: null
    user_id: fb3217eb6091454291bdd4281738e0c4
entity:
  - light.kitchen_peninsula
duration: invalid
effect: clear effect
brightness: 11
color: no change
input_floor: []
input_area: []
input_group: []
input_device: []
input_entity: []
input_color: no change
input_duration: invalid
input_brightness: '11'
input_effect: Clear Effect
input_LEDcolor: no change
input_LEDcolor_off: no change
input_LEDbrightness: '11'
input_LEDbrightness_off: '11'

I was using the main branch, but I just imported that version over the prior one and still not getting any change on the switch.

Okay. In the “changed variables” you just posted in 109, I can see you’re using the blueprint and not calling the script (input_floor is the blueprint variable, and the script variable is just floor). It looks like your blueprint is configured with the defaults (clear all settings), which is why you’re not seeing any effects take effect. In your “changed variables” I can see it trying to clear the effects:

entity:
  - light.kitchen_peninsula
duration: invalid
effect: clear effect
brightness: 11
color: no change

If you want to use the Blueprint you have to configure it with the variables you’re going to use and then click “save script”. The variables can’t be changed dynamically though. You’d go back and configure a new one with different variables and save that with a different name. Honestly, I find it too limiting and I don’t use any blueprints.

If you want to pass variables to it, you’ll need to use the script.

  • In Home Assistant:
    • Click on “Settings” in the left-hand navigation pane.
    • “Automations & Scenes”
    • “Scripts” near the top in a horizontal menu / tab.
    • Blue, “+ Add Script” button in the lower-right.
    • “Create new script”
    • In the upper-right click the vertical ellipsis (three dot) menu and then “edit in Yaml”.
    • Delete the pre-populated lines.
  • Open a new tab
  • In Gitub: GitHub - kschlichter/Home-Assistant-Inovelli-Effects-and-Colors: Scripts for setting LED indicators and effects on Inovelli products.
  • On the right side, click the “copy raw file” in between the “raw” and “download” buttons.
  • In Home Assistant:
    • Paste the contents into the Yaml editor.
    • In the vertical ellipsis select “Edit in Visual Editor”
    • Blue, “Save Script” button in the lower right.

The down-side of this is that you have to do that every time you want to update. It isn’t as easy as clicking the “re-import blueprint” button but I think the script is a lot more powerful.

Ooooooh… I’ve not used many blueprints before, but I thought the idea was to make importing the script easier. I’ll adjust!! Thanks!

That would be really nice. I’d make changes to support that. Maybe there’s a way and I just haven’t come across the documentation for it.

Let me know when you get it working. I know it’s been a long struggle for us here. :slight_smile:

I just imported it correctly now and was able to fire off a notification to both a red and blue series. Thanks so much for continual help. Now I’ll go revisit my handful of automations to make them more seamless!

1 Like

@kschlichter - first of all really appreciate all the hard work you have put in to create the script and blueprint. Also appreciate all the help you are providing to everyone to troubleshoot and helping with your script automation.

Unfortunately I am one of them seeking your help. I have tried to follow the all the advice and guidance you provided to @hoyt but I am still struggling to get the notification kicked off.

As you suggested I created the script by copying RAW format of your script.
I also went to developer → action → and called your script

action: script.inovelli_effects_and_colors
data:
  entity: 'light.2_1_dimmer'
  LEDcolor: 'green'
  LEDnumber: 'led 7'
  LEDbrightness: 7.5
  LEDbrightness_off: 2.3
  duration: '1 second'
  effect: 'Solid'
  color: 'green'
  brightness: 7

looking at traces Top level
image

Step config

variables:
  LEDnumber: '{{ LEDnumber|default("all")|lower }}'
  color: '{{ color|default("no change")|lower }}'
  duration: '{{ duration|default("0")|lower }}'
  brightness: '{{ brightness|default("11")|float }}'
  effect: '{{ effect|default("clear effect")|lower }}'
  LEDcolor: '{{ LEDcolor|default("no change")|lower }}'
  LEDcolor_off: '{{ LEDcolor_off|default("no change")|lower }}'
  LEDbrightness: '{{ LEDbrightness|default("11")|float }}'
  LEDbrightness_off: '{{ LEDbrightness_off|default("11")|float }}'

changed variables - sending you only selected context as there is lots of data.

this:
  entity_id: script.inovelli_effects_and_colors
  state: 'off'
  attributes:
    last_triggered: '2024-12-09T12:41:11.099231+00:00'
    mode: parallel
    current: 0
    max: 100
    friendly_name: inovelli_effects_and_colors
  last_changed: '2024-12-09T12:41:11.126414+00:00'
  last_reported: '2024-12-09T12:41:11.126414+00:00'
  last_updated: '2024-12-09T12:41:11.126414+00:00'
  context:
    id: 01JENQ06NJEK14R8S3C8WNKC91
    parent_id: null
    user_id: edf2611ea4ca4e74b9aecfb9a3adafed
entity: light.2_1_dimmer
LEDcolor: green
LEDnumber: led 7
LEDbrightness: 7.5
LEDbrightness_off: 2.3
duration: forever
effect: solid
color: red
brightness: 7
color_set:
all clear:
all unicorn:
all usa:
led_map:
duration_values:
LZW30_effects:
LZW31_effects:
LZW30SN_effects:
LZW31SN_effects:
zigbee2mqtt_models:
  - Inovelli 2-in-1 switch + dimmer (VZM31-SN)
  - 2-in-1 switch + dimmer (VZM31-SN)
  - Inovelli Fan Controller (VZM35-SN)
  - Fan Controller (VZM35-SN)
zha_models:
  - VZM31-SN
  - VZM35-SN
floor: invalid
area: invalid
group: invalid
device: invalid
entities_from_floor: []
entities_from_area: []
entities_from_group: []
entities_from_device: []
entities_from_entity:
  - light.2_1_dimmer
all_selected_entities:
  - light.2_1_dimmer
context:
  id: 01JENQ1K9JN63X74DPFM94VD5X
  parent_id: null
  user_id: edf2611ea4ca4e74b9aecfb9a3adafed
LEDcolor_off: no change

image

Changed Variable

Iteration 1

repeat:
  first: true
  index: 1
  last: false
  item:
    device_type: LZW30
    call_type: zwave_js
    entities: []

Iteration 2

repeat:
  first: false
  index: 2
  last: false
  item:
    device_type: LZW31
    call_type: zwave_js
    entities: []

Iteration 3

repeat:
  first: false
  index: 3
  last: false
  item:
    device_type: LZW30SN
    call_type: zwave_js
    entities: []

Iteration 4

repeat:
  first: false
  index: 4
  last: false
  item:
    device_type: LZW31SN
    call_type: zwave_js
    entities: []

Iteration 5

repeat:
  first: false
  index: 5
  last: false
  item:
    device_type: LZW36_light
    call_type: zwave_js
    entities: []

Iteration 6

repeat:
  first: false
  index: 6
  last: false
  item:
    device_type: LZW36_fan
    call_type: zwave_js
    entities: []

please let me know what else do you need :frowning:

Which device model are you using? The iterations you sent are for the LZWs (Red 500 Series) but the name, light.2_1_dimmer, would suggest a Red 800 Series. The Red 500 Series (LZW models) don’t support individual LED settings at all. The Red 800 Series (VZW models) support effects at the individual LEDs but not individual LED colors like you’re trying to do. At least, I never found evidence for it and decided to buy the Blue Series to do that. I can add support for individual LED effects but I’ve never figured out a real use case to justify the time.

Run this to see if the effect works:

action: script.inovelli_effects_and_colors
data:
  entity: 'light.2_1_dimmer'
  duration: '1 second'
  effect: 'Solid'
  color: 'green'
  brightness: 7

Run this to see if setting the LED bar color works (note that this will only set the ‘on’ color and not the ‘off’ color):

action: script.inovelli_effects_and_colors
data:
  entity: 'light.2_1_dimmer'
  LEDcolor: 'green'
  LEDbrightness: 7.5
  LEDbrightness_off: 2.3

Sorry I don’t have better news for you.

I have VZW31-SN

image

Both worked

action: script.inovelli_effects_and_colors
data:
  entity: 'light.2_1_dimmer'
  duration: '1 second'
  effect: 'Solid'
  color: 'green'
  brightness: 7

and

action: script.inovelli_effects_and_colors
data:
  entity: 'light.2_1_dimmer'
  LEDcolor: 'green'
  LEDbrightness: 7.5
  LEDbrightness_off: 2.3
1 Like

@kschlichter I do believe I can change individual led’s. I have a node-red automation where I am changing the individual led’s directly