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

I don’t have Hubitat so I’d need you to do all the testing. The first step would be to figure out what the service calls look like for Z-Wave and Zigbee devices. From there it’s probably just a lot of copy / paste. Once you have that, open an issue on GitHub and we’ll go from there.

# Zwave JS
- service: zwave_js.set_config_parameter
  data:
    entity_id: "{{ repeat.item.entities }}"
    parameter: >-
      {% set effect_param = repeat.item.device_type + '_ledbrightness_off' %} 
      {{ "off" if parameters[effect_param] == 0 else parameters[effect_param] }}
    value: "{{ LEDbrightness_off }} "
# Zigbee2mqtt
- service: mqtt.publish
  data:
    topic: >-
      zigbee2mqtt/{{ states[repeat.item].attributes.friendly_name }}/set
      payload: >-
        { "ledIntensityWhenOff": {{ (LEDbrightness_off * 256 / 10) }} }

If anyone has a Red 800 Series “2-in-1” device, I could use some help testing some new code to enable brightness in steps of 1 instead of 10. Previously the script and blueprint could only set brightness to 10%, 20%, … 100%. The new code will set it from 1% to 100% in steps of one for Red 800 Series and Blue Series devices. I don’t have any Red 800 Series devices to test.

Red 500 Series and Black 500 Series are limited by the device to only support steps of 10% so this feature doesn’t apply to these devices.

Beta code to test

How to import and test:

  • 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 Github (“Beta code to test” link above)
    • Since this hasn’t been merged into master yet, in the left-hand nav pane, under files, there’s a drop-down that says “master”. Change that to “Zigbee2MQTT-Inovelli-Device-Name-Change”.
    • 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.

To test the script, you can use “developer tools” → “Services” and type “Inovelli LED Settings and Effects” to use the UI, and “Go to Yaml Mode” to see the code for automations.

My apologies, I forgot to enable notifications on the thread. I would love to beta test for you!

I’ve been able to find this in the Hubitat HACS documentation:

  • Send a command to a Hubitat device
service: hubitat.send_command
data:
  entity_id: switch.some_switch
  command: on
service: hubitat.send_command
data:
  entity_id: light.some_light
  command: setHue
  args: 75
service: hubitat.send_command
data:
  entity_id: light.some_light
  command: setLevel
  args: [50, 3]

I believe this would use the Hubitat Maker API and you wouldn’t be sending the native Z-Wave commands as you do with Zwave JS. Is this sufficient or do you need additional details?

I used the script from 19-can-we-modify-the-brightness-slider-to-be-a-float/inovelli_led.yaml. I’m not 100% sure that each brightness step in .1 increments is working. But it didn’t cause any errors.

1 Like

I do have a credit for your code in my post, it’s in the thanks section. It’s been there since you offered to let me use it. I only copied your implementation of iterating over multiple areas, devices, and entities. I even edited it to use the target selector instead of using 3 separate fields. I’m sorry if you think I copied without credit.

1 Like

I apologize. I only looked at the code on github. I overlooked the comment in the post and I’m so sorry. I’ve edited my comment above, which was totally unnecessary in the first place.

2 Likes

Thanks, I appreciate it. You do bring up a good point, I don’t have any credits on my Github. I will be adding that later today.

GitHub updated with a thanks section. Once again thanks for your code!

Thanks for being so cool about this. I was out of line. I’m really sorry for how I conducted myself.

2 Likes

Forgive me in advance if this is a completely stupid question and feel free to tell me or ignore me if it is! I’m just getting started with blueprints and these Inovelli Red 800 2-1 switches are much more complicated than some of the other zwave devices I’m dealing with.

My goal is simple. I would like all of the LED’s (all 7 of them?) to be Blue and on at all times. I would then like LED’s 1, 2 & 3 to turn red and stay red whenever the “Garage Under Cab Lights” light switch is activated, and for them to return to their previous state (blue) when the “Garage Under Cab Lights” are turned off.

To accomplish this do I use the:

“number.garage_lights_led1_strip_effect_color”
“number.garage_lights_led2_strip_effect_color” 
“number.garage_lights_led3_strip_effect_color”

Entities in the “Entity” section of your Blueprint?

It’s especially confusing because this light switch exposes the following entities for every LED:

“led1_strip_effect_duration”

“led1_strip_effect_level”

“led1_strip_effect_color”

Thanks for creating and sharing this Blueprint!

if this is a completely stupid question

It’s not. :slight_smile:

I would like all of the LED’s (all 7 of them?) to be Blue and on at all times.

service: script.inovelli_led
data:
  entity: "{{ template to your light.* entity id that you'd use to turn it on or off }}"
  LEDcolor: Blue
  LEDcolor_off: Blue
  LEDbrightness: 7
  LEDbrightness_off: 3

I would then like LED’s 1, 2 & 3 to turn red…

My script isn’t able to control individual LEDs just yet. I’ve been adding more granularity to the on / off brightness (0 – 100 instead of 0 ­– 10) and I got sidetracked with adding ZHA support. Controlling individual LEDs is next on my list. I thought I’d have it done by the end of the month but setting non-effect LED colors in ZHA has me wrapped around the axle at the moment.

Ultimately, I think I’ll have the script track down the number.* entities to configure all of this but it feels fragile since it depends on a specific naming schema for those entities. I’m trying to find a way to configure these through a service call into the firmware directly, which should be more stable.

For now, you’re struggling to make it work because my blueprint won’t do that for you. I think I’ve seen others that will but they’ll only set effects (not the on / off color) and they seem to only work with one integration or another.

1 Like

Someone loaned me a Blue Series dimmer and—after a few weeks of struggle and finally asking for help—I have ZHA working. Nobody seems to have been asking for it but that’s what I use for my three Zigbee devices and I’m too lazy to convert them to Zigbee2MQTT. Adding support seemed easier (at first).

@taeuscherpferd updated the brightness levels to be floats (0.0 – 10.0). For Red 800 Series and Blue Series devices, the brightness levels will be multiplied by 10 to give you 0 – 100 granularity. Older Black Series and Red 500 Series devices are rounded off since they only support 0 – 10, stepping every 10%. Old automations will continue to work, even with newer devices, but if you need more granularity in the brightness levels, then you can get that now.

I’ll work on the individual LED settings next.

1 Like

I think I have individual LED control working for ZHA now. The effects and the on / off LEDs work, with a couple of color sets for the latter. I thought I saw this on Inovelli’s website somewhere but I can’t find it now or it was someone else’s script, so I made up two of my own: “USA” is red, white, and blue; “unicorn” is… for my daughter. I’ll probably add Christmas and Halloween at some point. I’d welcome suggestions for other themes (or if someone can find that documentation…?). These will only work if you set LEDnumber: ‘all’, since they use the whole bar to display the theme. Effects only work with single colors, not color sets, since you can only control one LED at a time. I also have a “clear” color to wipe the individual LEDs so the whole bar color can be used.

If you have a Blue Series dimmer on ZHA I would appreciate some feedback. I don’t use Zigbee2MQTT so that’ll have to wait until I’m back from vacation, and the Red 800 Series individual control I’ll be doing strictly on documentation, since I don’t have a device. I might be able to find some time to draft a beta for someone to try while I’m on vacation next week.

Individual LED control in ZHA (beta): I only have the script drafted right now. Instructions for adding this as a script for testing are up in comment 16.

Since the Red 800 Series only support effects for individual LEDs and not the on / off colors, this turned out to be easier than I thought. It should be working now but I don’t have a Red 800 Series device so I’m not sure. I could really use some feedback here.

I’ve also fixed some bugs in the Blue Series ZHA code.

Black Series and Red 500 Series are protected against any of the individual LED configurations. If you pass LEDnumber: led {{n}} these devices won’t change anything or clear effects.

The defaults are such that any old automations should still work with the new updates. Mine do.

Since I don’t have Zigbee2MQTT for my Zigbee devices, this will take me some time to read up on and figure out. If anybody has the service calls handy for configuring individual LED on / off and effect settings, the rest should be easy. I’ll re-use the logic from ZHA to loop through them.

Beta code to test

Instructions for importing the beta (but use the code linked in this comment and not that one).

1 Like

Take a look here home-assistant-blueprints/script/inovelli_blue_led_zigbee2mqtt.yaml at 3a2cc81afb7ff2c1fba30d048e533052b690771a · zanix/home-assistant-blueprints · GitHub

I set up a variable based on whether all or a single LED is selected.
This is sent via MQTT to Z2M.

1 Like

That’s what I did with ZHA too, but I think I’m going to change it to a multi-select and then loop through whatever is selected. To do a “USA” type theme with 3 red, 4 white, and 3 blue LEDs, doing 7 service calls seems like a hassle. A multi-select would let us do it in 3 calls, and I might add an advanced mode where you can send a dictionary of all 7. That would be one service call in Hass, which could be templated. In the code I guess it’ll still be 7 commands to ZHA or MQTT but easier for the users.

I’ll probably put Zigbee on hold for a bit though. I want to add the new levels, labels, and categories to the entity search. That’s a feature I’ve been eager to see for awhile.

I was thinking about the same thing, allowing the selection of multiple, single LEDs but I’m stuck on the “separate service call per-LED” sent to MQTT as well.

I’m also working on adding floor and label support right now. As for categories, they only seem to apply to automations and scripts. The target selector only allows choosing floor/area, device, entity, and label.

@kschlichter Hey Kevin, sorry for ghosting! I just got a new job a couple of months ago so life has been busy. Hoping to get back to testing as my notifications on my Inovelli Red Series ZWave 800 Series 2-in-1 Wall Dimmer Switches have made no sense. Let me know if you specifically need anything tested and I’ll give it a shot (likely this weekend).

I’ve got an old black series running v1.57 firmware and this blueprint gets some errors when I try to use it and nothing happens on the LED display. Any ideas what’s going on? Do I need to enable all the attributes?

Logger: homeassistant.helpers.template
Source: helpers/template.py:2558
First occurred: 11:25:00 PM (1 occurrences)
Last logged: 11:25:00 PM

Template variable warning: 'dict object' has no attribute '' when rendering '{{ color_set[LEDcolor] }}'
Logger: homeassistant.components.script.1714536947219
Source: helpers/script.py:1933
integration: Script (documentation, issues)
First occurred: 11:25:00 PM (4 occurrences)
Last logged: 11:25:00 PM

New Script: Repeat at step 2: Choose at step 2: choice 1: Choose at step 1: choice 1: Error executing script. Error for call_service at pos 1: Node(node_id=6) - InvalidNewValue: State '' not found for parameter 6-112-0-13
New Script: Repeat at step 2: Choose at step 2: choice 1: Error executing script. Error for choose at pos 1: Node(node_id=6) - InvalidNewValue: State '' not found for parameter 6-112-0-13
New Script: Repeat at step 2: Error executing script. Error for choose at pos 2: Node(node_id=6) - InvalidNewValue: State '' not found for parameter 6-112-0-13
New Script: Error executing script. Error for repeat at pos 2: Node(node_id=6) - InvalidNewValue: State '' not found for parameter 6-112-0-13
Logger: homeassistant.components.websocket_api.http.connection
Source: components/websocket_api/commands.py:239
integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 11:25:00 PM (1 occurrences)
Last logged: 11:25:00 PM

[139761527413056] Node(node_id=6) - InvalidNewValue: State '' not found for parameter 6-112-0-13
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 239, in handle_call_service
    response = await hass.services.async_call(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2543, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2580, in _execute_service
    return await target(service_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/script/__init__.py", line 672, in _service_handler
    response = await self._async_start_run(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/script/__init__.py", line 630, in _async_start_run
    script_result = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/script/__init__.py", line 661, in _async_run
    return await self.script.async_run(script_vars, context)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1728, in async_run
    return await asyncio.shield(create_eager_task(run.async_run()))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 457, in async_run
    await self._async_step(log_exceptions=False)
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 509, in _async_step
    self._handle_exception(
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 539, in _handle_exception
    raise exception
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 507, in _async_step
    await getattr(self, handler)()
  File "/usr/src/homeassistant/homeassistant/helpers/trace.py", line 284, in async_wrapper
    await func(*args)
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 912, in _async_repeat_step
    await async_run_sequence(iteration, extra_msg)
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 863, in async_run_sequence
    await self._async_run_script(script)
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1217, in _async_run_script
    result = await self._async_run_long_action(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 705, in _async_run_long_action
    return await long_task
           ^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1728, in async_run
    return await asyncio.shield(create_eager_task(run.async_run()))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 457, in async_run
    await self._async_step(log_exceptions=False)
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 509, in _async_step
    self._handle_exception(
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 539, in _handle_exception
    raise exception
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 507, in _async_step
    await getattr(self, handler)()
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1023, in _async_choose_step
    await self._async_run_script(script)
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1217, in _async_run_script
    result = await self._async_run_long_action(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 705, in _async_run_long_action
    return await long_task
           ^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1728, in async_run
    return await asyncio.shield(create_eager_task(run.async_run()))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 457, in async_run
    await self._async_step(log_exceptions=False)
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 509, in _async_step
    self._handle_exception(
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 539, in _handle_exception
    raise exception
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 507, in _async_step
    await getattr(self, handler)()
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1023, in _async_choose_step
    await self._async_run_script(script)
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1217, in _async_run_script
    result = await self._async_run_long_action(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 705, in _async_run_long_action
    return await long_task
           ^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1728, in async_run
    return await asyncio.shield(create_eager_task(run.async_run()))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 457, in async_run
    await self._async_step(log_exceptions=False)
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 509, in _async_step
    self._handle_exception(
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 539, in _handle_exception
    raise exception
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 507, in _async_step
    await getattr(self, handler)()
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 742, in _async_call_service_step
    response_data = await self._async_run_long_action(
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 705, in _async_run_long_action
    return await long_task
           ^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2543, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2580, in _execute_service
    return await target(service_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/zwave_js/services.py", line 581, in async_set_config_parameter
    process_results(list(nodes), results)
  File "/usr/src/homeassistant/homeassistant/components/zwave_js/services.py", line 578, in process_results
    raise_exceptions_from_results(nodes_or_endpoints_list, _results)
  File "/usr/src/homeassistant/homeassistant/components/zwave_js/services.py", line 109, in raise_exceptions_from_results
    raise HomeAssistantError("\n".join(lines))
homeassistant.exceptions.HomeAssistantError: Node(node_id=6) - InvalidNewValue: State '' not found for parameter 6-112-0-13