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

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!