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

This blueprint and script can set and clear effects as well as configure the LED or LED strip on Inovelli dimmers, switches, and fan / light combo dimmers from the “Black”, “Red 500”, “Red 800”, and “Blue” series. Devices of different types can be called simultaneously. It will accept entities, the device ID, groups, areas (or area: all ), floors (or floor: 'all' ), and find all Inovelli devices in the house. This blueprint and script can set everything at once—even if the devices are different series and being called from different combinations of sources (e.g. 2 areas, and 3 entities).

Supported Inovelli devices:

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

[2024-06-23] Floor selector and individual LED control
[2024-01-24] Black series support, correcting some effect values in the Blue series, and some general cleanup.
[2024-01-05] Added support for Blue Series devices
[2022-05-17] Fixed a typo that caused an error when setting “pulse” effects on switch devices.
[2022-06-06] Areas and devices no longer need to be lists (entities were already being converted if they were in list format). This should make the script much easier to call from automations and scripts using templates.
[2023-05-01] The script will use the areas() function introduced in 2023-04 to accept “area: all”. This will search each area Home Assistant knows about, and apply the settings to all compatible Inovelli devices.
[2024-01-05] Adding support for Blue Series devices and groups of devices. These groups can be of the light.* or group.* domain, and any combo of Blue or Red series switches, dimmers, or fan / light combo devices.
[2024-03-28] Added ZHA support and brightness levels were converted to float. Devices that support 0 – 100 brightness levels will be multiplied by 10; devices that support 0 – 10 brightness levels will be rounded off.

Original discussion thread

Notification effect examples:

    service: script.inovelli_led
    data:
      area: 'Family Room' # This can also be an area ID, if you're using a template.
      duration: Forever
      effect: CHASE
      brightness: 8.5
      color: Teal
                  
    service: script.inovelli_led
    data:
      area: all
      duration: Forever
      effect: Blink
      brightness: 8
      color: 'Light Pink'

    service: script.inovelli_led
    data:
      entity: fan.front_porch, light.front_door #Mix and match device types!
      effect: pulse
      brightness: 8
      color: red

Clearing the effects above

    service: script.inovelli_led
    data:
      area: 'Family Room'
      entity: fan.front_porch, light.front_door

LED color example:

    service: script.inovelli_led
    data:
      entity: light.office
      LEDcolor: blue
      LEDcolor_off: red
      LEDbrightness: 7.2
      LEDbrightness_off: 2.4

LEDbrightness_off example: (maybe part of a nighttime routine?)

    service: script.inovelli_led
    data:
      group: group.bedroom_lights
      LEDcolor_off: red
      LEDbrightness_off: 2
3 Likes

@jayw, if you have some time, would you mind deleting the script version we were playing with and importing the blueprint? I noticed this morning that I’d pointed you to a version of the script that I was still developing and I wonder if that’s related to the area problem we you were having.

@kschlichter I’m trying to use the script version with LZW-31SN switches (1.61 firmware). It just isn’t working at all for me. If I use the blueprint version I can get them to change color, but effects don’t seem to work. I’m not sure what I’m doing wrong.

Edit: Actually, I was wrong. It doesn’t work with blueprints either. The only thing that works are the “color when on” and “color when off” settings

service: script.1708468893547
data:
  device:
    - 5f68f034d2c137aa5dc15acb1bc5f91a
  duration: Forever
  effect: Solid
  brightness: "11"
  color: Green

The maximum brightness is 10. The code isn’t executed if the brightness is set to 11. This is so that you can change the effect or color without changing the brightness (which might be set by a separate day / night automation).

By the way, the LZW31-SN doesn’t have a “color when off” option so that code will be skipped unless you also have a VZW31-SN (Red 800 Series) or VZM31-SN (Blue Series).

 Setting the LED indicator
   LEDcolor: (int or string) Sets color of status LED.  If LEDcolor_off is defined and supported by the device, this is only used for "on" status.
   LEDbrightness: (whole integer 1 – 10) Sets the brightness of the status LED.  If LEDbrightness_off is defined and supported by the device, this is only used for "on" status.
   LEDbrightness_off: (whole integer 1 – 10) Sets the brightness of the status LED when off, for devices that support this feature.
   LEDcolor_off: (int or string) Sets color of status LED when off, for devices that support this feature.
     Note that the Blue 2-in-1 switch/dimmer and Red 2-in-1 switch/dimmer support separate colors for on and off while the Black 500 and Red 500 Series devices do not.

 Required for setting LED effects
   duration: (string or whole integer of seconds) Either "Off", an integer of seconds, or a whole integer followed by "Seconds", "Minutes", "Hours", "Indefinitely", or "Forever".
   effect: (string) Where older devices don't support a new effect, that effect has been mapped to something that is supported.
   brightness: (integer 1 – 10) Sets the brightness of the LED's effect
   color: (string) Sets color of LED effect.

Try this:

service: script.1708468893547
data:
  device:
    - 5f68f034d2c137aa5dc15acb1bc5f91a
  duration: Forever
  effect: Solid
  brightness: 10
  color: Green

That was it. I didn’t actually change the brightness, just left it as what the default was set to. But shouldn’t it have still changed the color and just left the brightness alone? Or did I misunderstand what you meant.

Hmm… You did not misunderstand me; I said the wrong thing. For effects it needs everything set. For the LED status bar you can send bits and pieces. It wouldn’t be hard to enable that for effects, if that’s something you think would be valuable. The quirky bit is that any changes reset the timer. If you have a 30sec effect in green and change it to red with 10sec left, it’ll restart the timer and you’ll have red for 30sec.

Anyway, I could modify the script this weekend to accept incomplete changes for effects. Right now it’s just for the LED status bar.

Thanks, it isn’t something I really need, just trying to understand.

Is there any way to select individual LEDs?

I have a couple of VZM35-SN (Blue Fan Switch) and can control each LED using Zanix blueprint. Do you have any idea if that is even possible through scripts or blueprints for the VZW31-SN?

All VZM and VZW devices do support that feature. I could certainly add that. I have a pretty good idea of how I would do it and I don’t think it would be complicated. I don’t have any so I would need someone to check a beta release for me and ensure everything is working. It’ll be a few weeks before I have a free weekend again but I bet I could do this by the end of the month. I just haven’t done it before because I thought it would clutter the UI, which is already burdened with a lot of options, but maybe that isn’t necessarily the case.

Let me know if you’re willing to beta test something for me near the end of the month.

@kschlichter This blueprint has stopped working for me after upgrading to Zigbee2MQTT version 1.36.0-1. After upgrading, the script doesn’t cause the LED colors to change, although all other functions of the switch still seem to work within HA.

After downgrading back to version 1.35.3-1, it works again. I tested upgrading and downgrading a couple times and every time I upgrade the LED functions stop working, and they start working again right after downgrading.

I don’t see any errors in the logs. Here is an example of a log entry after running a script using the blueprint.

Zigbee2MQTT:info 2024-03-05 15:51:14: MQTT publish: topic 'zigbee2mqtt/Front Porch Lights', payload '{"action":null,"activeEnergyReports":10,"activePowerReports":10,"autoTimerOff":0,"auxSwitchUniqueScenes":null,"bindingOffToOnSyncLevel":null,"brightness":254,"brightnessLevelForDoubleTapDown":null,"brightnessLevelForDoubleTapUp":null,"buttonDelay":"0ms","defaultLed1ColorWhenOff":255,"defaultLed1ColorWhenOn":255,"defaultLed1IntensityWhenOff":101,"defaultLed1IntensityWhenOn":101,"defaultLed2ColorWhenOff":255,"defaultLed2ColorWhenOn":255,"defaultLed2IntensityWhenOff":101,"defaultLed2IntensityWhenOn":101,"defaultLed3ColorWhenOff":255,"defaultLed3ColorWhenOn":255,"defaultLed3IntensityWhenOff":101,"defaultLed3IntensityWhenOn":101,"defaultLed4ColorWhenOff":255,"defaultLed4ColorWhenOn":255,"defaultLed4IntensityWhenOff":101,"defaultLed4IntensityWhenOn":101,"defaultLed5ColorWhenOff":255,"defaultLed5ColorWhenOn":255,"defaultLed5IntensityWhenOff":101,"defaultLed5IntensityWhenOn":101,"defaultLed6ColorWhenOff":255,"defaultLed6ColorWhenOn":255,"defaultLed6IntensityWhenOff":101,"defaultLed6IntensityWhenOn":101,"defaultLed7ColorWhenOff":255,"defaultLed7ColorWhenOn":255,"defaultLed7IntensityWhenOff":101,"defaultLed7IntensityWhenOn":101,"defaultLevelLocal":254,"defaultLevelRemote":254,"deviceBindNumber":null,"dimmingSpeedDownLocal":127,"dimmingSpeedDownRemote":25,"dimmingSpeedUpLocal":127,"dimmingSpeedUpRemote":25,"doubleTapClearNotifications":"Disabled","doubleTapDownToParam56":null,"doubleTapUpForFullBrightness":"Button Press Event + Set Load to 100%","doubleTapUpToParam55":null,"energy":0.87,"firmwareUpdateInProgressIndicator":"Enabled","higherOutputInNonNeutral":null,"individual_led_effect":null,"internalTemperature":null,"invertSwitch":"No","ledBarScaling":null,"ledColorWhenOff":170,"ledColorWhenOn":170,"ledIntensityWhenOff":0,"ledIntensityWhenOn":100,"led_effect":{"color":0,"duration":255,"effect":"off","level":40},"linkquality":72,"loadLevelIndicatorTimeout":"5 Seconds","localProtection":"Disabled","maximumLevel":254,"minimumLevel":60,"onOffLedMode":"All","outputMode":"Dimmer","overheat":null,"periodicPowerAndEnergyReports":10,"power":0,"powerType":null,"quickStartFan":null,"quickStartLightLevel":null,"quickStartLightTime":null,"rampRateOffToOnLocal":0,"rampRateOffToOnRemote":0,"rampRateOnToOffLocal":0,"rampRateOnToOffRemote":0,"relayClick":"Enabled (Click Sound Off)","remoteProtection":null,"smartBulbMode":"Disabled","state":"OFF","stateAfterPowerRestored":255,"switchType":"Single Pole","update":{"installed_version":16908815,"latest_version":16908815,"state":"idle"},"update_available":null}'

@soonerfan237, in “developer tools” → template, if you replace my light entity in the template below with your light entity, what does it give you?

{{ device_attr('light.guest_room_lights_level','model') }}

It gives:

Inovelli 2-in-1 switch + dimmer (VZM31-SN)

That’s with version 1.36? It looks like Inovelli may have renamed the device so I was thinking it might end up with nothing to send because the script can’t find a device with the exact name it’s looking for.

Can you send me the Home Assistant trace from the script or blueprint (whichever you’re using)?

Sorry, that was the output from the downgraded version. Here is the output from version 1.36. Looks like the name did change.

2-in-1 switch + dimmer (VZM31-SN)

Inovelli changed the device name. I can update this pretty easily but I’m swamped at work right now so it might take me until the weekend. Can you hold off on the update until then?

Are you using the blueprint or the script? I can tell you how to modify it quickly using the script. I don’t use blueprints though, so I don’t know if a way to modify the backend code for them.


Note to @kschlichter - Don’t forget to check the Red 800 series to see if they changed too.

That’s totally fine - thank you for the help!

I wasn’t going to be able to let this go so I’ve made the changes. Would you mind testing it in script form with both Zigbee2MQTT 1.35 and 1.36? I want to make sure it picks up both the old and new device names so people don’t need to worry about forward / backward compatibility. I’ve typed out steps for you below, in case you need them. It would really help me out. I don’t have any Blue Series devices. If this works, I can publish a new blueprint tomorrow.

  • 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 script)
    • 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. That code can be modified with templates.

I can confirm that this is working for me. Thank you for the quick response!

Thanks for this amazing blueprint/script! Would it be possible to enhance this to support using the Hubitat integration as well? I’m running HA in a VM and using that integration to expose my Hubitat-connected devices to HA via the Maker API.

I’d love to be able to make a group of Inovelli switches (as exposed via the Hubitat integration) within HA and have this script send the appropriate commands to each device in the group. My group would be mixing and matching various Inovelli switch models, of course.

I’ve published this release. Update the blueprint and let me know if you run into any issues. I don’t use blueprints so I’m not sure if there’s something I need to do for the “import” button to update.