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

The one from the “import blueprint” button at the top of this thread, which I believe is here Home-Assistant-Inovelli-Effects-and-Colors/blueprints/script/kschlichter/inovelli_led_blueprint.yaml at 980311779a7701ccd72ce2ab8d801936b709cfb5 · kschlichter/Home-Assistant-Inovelli-Effects-and-Colors · GitHub

I do have the trace, too big to paste as code unfortunately. What’s the best way to post it?

Please use a code share site to share code or logs, for example:

https://dpaste.org/ (select YAML for the language, and consider picking a longer expiry)
http://pastie.org/ (select YAML for the language)
https://paste.debian.net/ (you guessed it, select YAML as the language)

Please don’t use Pastebin, since it can randomly add spaces to the main view. Please also don’t share text as images since it makes it harder for people to help you. Remember that others may have colour blindness, impaired vision, etc.

Here’s the “changed variables” from the trace.

this:
  entity_id: script.inovelli_blue_series_master_bathroom_fan_clear_notifications
  state: 'off'
  attributes:
    last_triggered: '2024-06-04T13:30:01.408366+00:00'
    mode: parallel
    current: 0
    max: 100
    friendly_name: 'Inovelli Blue Series Master Bathroom Fan Clear Notifications '
  last_changed: '2024-06-04T13:58:35.906444+00:00'
  last_reported: '2024-06-04T13:58:35.906444+00:00'
  last_updated: '2024-06-04T13:58:35.906444+00:00'
  context:
    id: 01HZHRPTM24889P8J697572A26
    parent_id: null
    user_id: null
input_area: invalid
input_group: invalid
input_device: invalid
input_entity:
  - fan.master_bathroom_fan
input_color: 'Off'
input_duration: 'Off'
input_brightness: '11'
input_effect: 'off'
input_LEDcolor: no change
input_LEDcolor_off: no change
input_LEDbrightness: '11'
input_LEDbrightness_off: '11'
color_set:
  'off': 0
  red: 0
  orange: 8
  lemon: 28
  yellow: 42
  lime: 64
  green: 85
  cyan: 127
  teal: 145
  blue: 170
  purple: 190
  magenta: 212
  light pink: 220
  pink: 234
  hot pink: 234
  white: 255
duration_values:
  'off': 0
  1 second: 1
  1 seconds: 1
  2 seconds: 2
  3 seconds: 3
  4 seconds: 4
  5 seconds: 5
  6 seconds: 6
  7 seconds: 7
  8 seconds: 8
  9 seconds: 9
  10 seconds: 10
  15 seconds: 15
  20 seconds: 20
  25 seconds: 25
  30 seconds: 30
  35 seconds: 35
  40 seconds: 40
  45 seconds: 45
  50 seconds: 50
  55 seconds: 55
  60 seconds: 60
  1 minute: 60
  1 minutes: 60
  2 minutes: 62
  3 minutes: 63
  4 minutes: 64
  5 minutes: 65
  6 minutes: 66
  7 minutes: 67
  8 minutes: 68
  9 minutes: 69
  10 minutes: 70
  15 minutes: 75
  30 minutes: 90
  45 minutes: 105
  60 minutes: 120
  1 hour: 120
  2 hours: 122
  forever: 255
  indefinitely: 255
LZW30_effects:
  'off': 0
  aurora: 0
  blink: 0
  blink fast: 0
  blink medium: 0
  blink slow: 0
  chase: 0
  chase fast: 0
  chase medium: 0
  chase slow: 0
  fall fast: 0
  fall medium: 0
  fall slow: 0
  open close: 0
  pulse: 0
  rise fast: 0
  rise medium: 0
  rise slow: 0
  siren fast: 0
  siren slow: 0
  small to big: 0
  solid: 0
  fast blink: 0
  slow blink: 0
LZW31_effects:
  'off': 0
  aurora: 0
  blink: 0
  blink fast: 0
  blink medium: 0
  blink slow: 0
  chase: 0
  chase fast: 0
  chase medium: 0
  chase slow: 0
  fall fast: 0
  fall medium: 0
  fall slow: 0
  open close: 0
  pulse: 0
  rise fast: 0
  rise medium: 0
  rise slow: 0
  siren fast: 0
  siren slow: 0
  small to big: 0
  solid: 0
  fast blink: 0
  slow blink: 0
LZW30SN_effects:
  'off': 0
  aurora: 4
  blink: 3
  blink fast: 2
  blink medium: 3
  blink slow: 3
  chase: 2
  chase fast: 2
  chase medium: 2
  chase slow: 3
  fall fast: 2
  fall medium: 3
  fall slow: 3
  open close: 4
  pulse: 4
  rise fast: 2
  rise medium: 3
  rise slow: 3
  siren fast: 4
  siren slow: 4
  small to big: 4
  solid: 1
  fast blink: 2
  slow blink: 3
LZW31SN_effects:
  'off': 0
  aurora: 4
  blink: 4
  blink fast: 3
  blink medium: 4
  blink slow: 4
  chase: 2
  chase fast: 2
  chase medium: 2
  chase slow: 2
  fall fast: 2
  fall medium: 2
  fall slow: 2
  open close: 2
  pulse: 5
  rise fast: 2
  rise medium: 2
  rise slow: 2
  siren slow: 2
  siren fast: 2
  small to big: 2
  solid: 1
  fast blink: 3
  slow blink: 4
LZW36_light_effects:
  'off': 0
  aurora: 4
  blink: 4
  blink fast: 3
  blink medium: 4
  blink slow: 4
  chase: 2
  chase fast: 2
  chase medium: 2
  chase slow: 2
  fall fast: 2
  fall medium: 2
  fall slow: 2
  open close: 2
  pulse: 5
  rise fast: 2
  rise medium: 2
  rise slow: 2
  siren slow: 2
  siren fast: 2
  small to big: 2
  solid: 1
  fast blink: 3
  slow blink: 4
LZW36_fan_effects:
  'off': 0
  aurora: 4
  blink: 4
  blink fast: 3
  blink medium: 4
  blink slow: 4
  chase: 2
  chase fast: 2
  chase medium: 2
  chase slow: 2
  fall fast: 2
  fall medium: 2
  fall slow: 2
  open close: 2
  pulse: 5
  rise fast: 2
  rise medium: 2
  rise slow: 2
  siren slow: 2
  siren fast: 2
  small to big: 2
  solid: 1
  fast blink: 3
  slow blink: 4
VZW31SN_effects:
  'off': 0
  aurora: 8
  blink: 15
  blink fast: 2
  blink medium: 15
  blink slow: 3
  chase: 5
  chase fast: 17
  chase medium: 5
  chase slow: 16
  fall fast: 11
  fall medium: 10
  fall slow: 9
  open close: 6
  pulse: 4
  rise fast: 14
  rise medium: 13
  rise slow: 12
  siren fast: 18
  siren slow: 19
  small to big: 7
  solid: 1
  fast blink: 2
  slow blink: 3
VZM31SN_effects:
  'off': 0
  aurora: 8
  blink: 15
  blink fast: 2
  blink medium: 15
  blink slow: 3
  chase: 5
  chase fast: 17
  chase medium: 5
  chase slow: 16
  fall fast: 11
  fall medium: 10
  fall slow: 9
  open close: 6
  pulse: 4
  rise fast: 14
  rise medium: 13
  rise slow: 12
  siren fast: 18
  siren slow: 19
  small to big: 7
  solid: 1
  fast blink: 2
  slow blink: 3
VZM35SN_effects:
  'off': 0
  aurora: 8
  blink: 15
  blink fast: 2
  blink medium: 15
  blink slow: 3
  chase: 5
  chase fast: 17
  chase medium: 5
  chase slow: 16
  fall fast: 11
  fall medium: 10
  fall slow: 9
  open close: 6
  pulse: 4
  rise fast: 14
  rise medium: 13
  rise slow: 12
  siren fast: 18
  siren slow: 19
  small to big: 7
  solid: 1
  fast blink: 2
  slow blink: 3
zwave_models:
  - LZW30
  - LZW31
  - LZW31-SN
  - LZW30-SN
  - LZW36
  - VZW31-SN
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
allowed_domains:
  - fan
  - light
  - switch
parameters:
  LZW30_effect_bulk: 'null'
  LZW30_effect_color: 'null'
  LZW30_effect_brightness: 'null'
  LZW30_effect_duration: 'null'
  LZW30_effect_effect: 'null'
  LZW30_ledcolor: LED Indicator Color
  LZW30_ledbrightness: LED Indicator Intensity (When on)
  LZW30_ledbrightness_off: LED Indicator Intensity (When Off)
  LZW31_effect_bulk: 'null'
  LZW31_effect_color: 'null'
  LZW31_effect_brightness: 'null'
  LZW31_effect_duration: 'null'
  LZW31_effect_effect: 'null'
  LZW31_ledcolor: LED Indicator Color
  LZW31_ledbrightness: LED Indicator Intensity
  LZW31_ledbrightness_off: LED Indicator Intensity (When Off)
  LZW31SN_effect_bulk: 16
  LZW31SN_effect_color: 'LED Indicator: Effect Color'
  LZW31SN_effect_brightness: 'LED Indicator: Effect Brightness'
  LZW31SN_effect_duration: 'LED Indicator: Effect Duration'
  LZW31SN_effect_effect: 'LED Indicator: Effect Type'
  LZW31SN_ledcolor: 'LED Indicator: Color'
  LZW31SN_ledbrightness: 'LED Indicator: Brightness When On'
  LZW31SN_ledbrightness_off: 'LED Indicator: Brightness When Off'
  LZW30SN_effect_bulk: 8
  LZW30SN_effect_color: LED Effect Color
  LZW30SN_effect_brightness: LED Effect Brightness
  LZW30SN_effect_duration: LED Effect Duration
  LZW30SN_effect_effect: LED Effect Type
  LZW30SN_ledcolor: LED Indicator Color
  LZW30SN_ledbrightness: LED Indicator Brightness
  LZW30SN_ledbrightness_off: LED Indicator Brightness When Off
  LZW36_light_effect_bulk: 24
  LZW36_light_effect_color: Light LED Effect Color
  LZW36_light_effect_brightness: Light LED Effect Brightness
  LZW36_light_effect_duration: Light LED Effect Duration
  LZW36_light_effect_effect: Light LED Effect Type
  LZW36_light_ledcolor: Light LED Indicator Color
  LZW36_light_ledbrightness: Light LED Strip Brightness
  LZW36_light_ledbrightness_off: Light LED Strip Brightness When Off
  LZW36_fan_effect_bulk: 25
  LZW36_fan_effect_color: Fan LED Effect Color
  LZW36_fan_effect_brightness: Fan LED Effect Brightness
  LZW36_fan_effect_duration: Fan LED Effect Duration
  LZW36_fan_effect_effect: Fan LED Effect Type
  LZW36_fan_ledcolor: Fan LED Indicator Color
  LZW36_fan_ledbrightness: Fan LED Strip Brightness
  LZW36_fan_ledbrightness_off: Fan LED Strip Brightness When Off
  VZW31SN_effect_bulk: 99
  VZW31SN_effect_color: All LED Strip Effect - Color
  VZW31SN_effect_brightness: All LED Strip Effect - Level
  VZW31SN_effect_duration: All LED Strip Effect - Duration
  VZW31SN_effect_effect: All LED Strip Effect - Effect
  VZW31SN_ledcolor: Default All LED Strip Color When On
  VZW31SN_ledcolor_off: Default All LED Strip Color When Off
  VZW31SN_ledbrightness: Default All LED Strip Brightness When On
  VZW31SN_ledbrightness_off: Default All LED Strip Brightness When Off
area: invalid
group: invalid
device: invalid
entity:
  - fan.master_bathroom_fan
entities_from_area: []
entities_from_group: []
entities_from_device: []
entities_from_entity:
  - fan.master_bathroom_fan
all_selected_entities:
  - fan.master_bathroom_fan
context:
  id: 01HZHT4PRY3WQTBW2ZN3AV7V9S
  parent_id: null
  user_id: 3e748f632f484289906e414655d414ec
color: 'off'
duration: 'off'
brightness: 11
effect: 'off'
LEDcolor: no change
LEDcolor_off: no change
LEDbrightness: 11
LEDbrightness_off: 11

Here’s the full trace.
https://dpaste.org/ww34s

input_brightness: ‘11’

It doesn’t seem to like the zero value for brightness. Try passing ‘0’ with quotes or even ‘1’. Since the effect itself is set to “off” it should still clear the effect. You should also be able to call the script with just:

alias: "Inovelli Blue Series Master Bathroom Fan Clear Notifications "
use_blueprint:
path: kschlichter/inovelli_led_blueprint.yaml
input:
entity:
- fan.master_bathroom_fan

The button at the top will always import the latest version of the script, so depending on when you did it, that may no longer be current. I think I was also changing some of this in March, before I bought a new house and took a new job, and got distracted. If loading the latest script and the above suggestions don’t work, I’ll try to make some time this weekend and see if I can set up ZigbeeMQTT to see how it’s all working.

I’ve update the script and the blueprint. No change unfortunately. Calling the script as you suggested does not work either. The switch in question is a VZM35-SN, which is the blue series fan switch.
This script call does not clear the effect.

service: script.inovelli_led
data:
  entity:
    - fan.master_bathroom_fan

This version also has no effect.

service: script.inovelli_led
data:
  entity:
    - fan.master_bathroom_fan
  color: "Off"
  effect: "off"

Currently, I can only clear effects on this switch by double pressing the config button.

I wonder if they changed the name again. In “developer tools” → template, if you past this into the template editor, what does it give you?

{{ device_attr(‘fan.master_bathroom_fan’,‘model’) }}

When you updated to 1.38, what version were you updating from?

I suspect the naming issue isn’t what we’re running into. It’s using the right device_type and call_type for the fan.

{
          "path": "sequence/1/repeat/sequence/0",
          "timestamp": "2024-06-04T14:23:39.302482+00:00",
          "changed_variables": {
            "repeat": {
              "first": false,
              "index": 11,
              "last": true,
              "item": {
                "device_type": "VZM35SN",
                "call_type": "z2m",
                "entities": [
                  "fan.master_bathroom_fan"
                ]
              }
            }
          },
          "result": {
            "result": true,
            "entities": []
          }
        }

In your trace, I don’t see the service call it’s using. Maybe I’m just not familiar enough with Z2M and I don’t know what I’m looking at. I’ll have to spend more time on it this weekend. The error you’re posting says “effect” is missing.

Does your device have an effect “clear”? Maybe I should be calling a different “off” effect for Z2M.


            - choose:
                - conditions: "{{ repeat.item.call_type == 'z2m' }}"
                  sequence:
                    # Zigbee2mqtt
                    - repeat:
                        for_each: "{{ repeat.item.entities }} "
                        sequence:
                          - service: mqtt.publish
                            data:
                              topic: >-
                                zigbee2mqtt/{{ states[repeat.item].attributes.friendly_name }}/set
                              payload: "{\"led_effect\":{\"duration\":\"1\",\"effect\":\"clear\"}}"

I updated from the previous version, 1.37.1-1.

According to what’s exposed in Z2M, it should be “clear_effect” apparently. If I apply this “effect” manually through Z2M, it DOES clear the notification. Perhaps that’s what changed. This was definitely working before the last Z2M update.

Great! Thanks for figuring it out. I’ll need to figure out how to discern the Z2M version to implement a fix.

As far as I can tell from the Z2M.io docs, the correct name for the effect has always been clear_effect. I’m not sure why clear ever worked. I’ve issued a new release with only this change. The blueprint will need to be reimported. If anyone is still on Z2M 1.37 or below, I’d love to know if I’ve broken anything so that I can fix it for all versions.

I also notice that “off” is an effect for these, unlike some of the Red Series where “off” means “clear the effect”. When I have more time I could add clear effect to the list of effects to differentiate them. If anyone is currently using “off” for “clear effect” it’ll break your automation and I’d love to hear from you before I cause you that trouble. I’d also like to hear if anyone is eager to use “off” as an effect. If nobody cares, maybe I’ll just leave things how they are.

1 Like

I can confirm this change resolves the issue. Thank you! I have lots of red series and I was using “off” in this particular case to clear the effect on the blue series fan switch, just like I do for my red series devices. Updating the blueprint/script resolved the issues with no further changes on my end.

1 Like

Release 2024.06.23

  • BREAKING CHANGE: Red Series and Blue Series devices now turn LEDs off with LEDeffect: 'off'. Use LEDeffect: 'clear' to end an effect.
  • Floor selector
  • Controlling Individual LEDs on Blue Series Devices by @kschlichter in Controlling Individual LEDs on Blue Series Devices by kschlichter · Pull Request #26 · kschlichter/Home-Assistant-Inovelli-Effects-and-Colors · GitHub
  • Blue Series devices using Zigbee Home Automation (ZHA) or Zigbee2MQTT (Z2M) can configure individual LEDs.
  • Added color sets “All USA” and “All Unicorn”.
    • All USA: top third is red, middle third is white, bottom third is blue
    • All Unicorn: top third is green, middle third is blue, bottom third is pink
    • All Clear: clears any individual LED settings to prepare the device for a full-bar color configuration.
    • Others would be easy to add; send me your ideas!
  • Individual LEDs can be configured for on and off separately.
  • Individual LED brightness con be configured for on and off separately.
  • FIXED: Blue series LED effect mapping
  • Cleaned up some of the command logic, fixed some typos, natural flavors.

Full Changelog: Comparing 2024.06.08...2024.06.23 · kschlichter/Home-Assistant-Inovelli-Effects-and-Colors · GitHub

Thanks for putting this blueprint together! I don’t have any previous versions installed, and only have a few Inovelli Blue switches controlled through ZHA. When I try to import the blueprint via the import button, I get an Invalid blueprint error from Home Assistant which appears to show that every field in the blueprint has extra keys. Ex:

extra keys not allowed @ data['blueprint']['device']. Got '{{ input_device|default("invalid")|lower }}'

Is there something incorrect with my setup, or is there something I need to do to enable the blueprint to load?

Thanks
Lev

I think I fixed my bug. Try it again.

That seems to have worked! Thanks for the quick fix!

This is a great blueprint thank you very much! I’ve had this in my automations for the past few weeks and it’s been 50/50 if it triggers. I am getting errors in the logs with the latest version.

Logger: homeassistant.components.script.day_led
Source: helpers/script.py:526
integration: Script (documentation, issues)
First occurred: 10:21:50 PM (15 occurrences)
Last logged: 10:28:27 PM

Light Switches Daytime LED Color: 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: 'off'
Light Switches Daytime LED Color: 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: 'off'
Light Switches Daytime LED Color: 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: 'off'
Light Switches Daytime LED Color: Repeat at step 2: Error executing script. Unexpected error for choose at pos 6: invalid literal for int() with base 10: 'off'
Light Switches Daytime LED Color: Error executing script. Unexpected error for repeat at pos 2: invalid literal for int() with base 10: 'off'
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 526, in _async_step
    await getattr(self, handler)()
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 763, in _async_call_service_step
    response_data = await self._async_run_long_action(
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 726, in _async_run_long_action
    return await long_task
           ^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2741, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2784, in _execute_service
    return await target(service_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1080, in _async_admin_handler
    await result
  File "/usr/src/homeassistant/homeassistant/components/zha/websocket_api.py", line 1361, in issue_zigbee_cluster_command
    await zha_device.issue_cluster_command(
  File "/usr/src/homeassistant/homeassistant/components/zha/core/device.py", line 850, in issue_cluster_command
    **convert_to_zcl_values(params, commands[command].schema)
      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/zha/core/helpers.py", line 199, in convert_to_zcl_values
    value = field.type(value)
            ^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/zigpy/types/basic.py", line 94, in __new__
    n = super().__new__(cls, *args, **kwargs)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: invalid literal for int() with base 10: 'off'
  1. Which device and integration are you using?
  2. What are the parameters you’re passing to it?
  3. Was it working before the 23rd?
  4. Did it stop after updating to the release on June 23rd or the release yesterday?

It shouldn’t be too hard to figure out what I broke.

Sorry for the delay, don’t know why I didn’t get the notification.

  1. VZM31-SN, ZHA
  2. See below
  3. I was not getting this error before the 23rd.
  4. I am able to run the first half to chance my switches LED colors with no issue. I can’t get this script to run any effects though. Regardless, it always produces this error. I’ve tried removing the groups and calling a switch individually and still produces this error.
alias: Light Switches Night LED Color
use_blueprint:
  path: kschlichter/inovelli_led_blueprint.yaml
  input:
    entity: []
    area: []
    device: []
    LEDcolor: Red
    LEDcolor_off: Red
    group:
      - light.inovelli_switches
    LEDbrightness: 2
    LEDbrightness_off: 0.2
    floor: []
    brightness: 0
    LEDnumber: All
description: ""
icon: mdi:weather-night

Edit: also getting this line in the error logs
“Error for choose at pos 1: Failed to set attribute: value: 2 attribute: 63 cluster_id: 64561 endpoint_id: 1“