Okay, I’m sure I’m missing something obvious, but how do I add this to my HA?
An up to date version of the inovelli_led
script can always be found at this link in my GitHub repository.
I’ve got that, but when I try to copy it into my scripts file or into the script editor, it generates errors and I can’t save.
You can paste the entirety of the YAML code into the Home Assistant script editor, as long as you remove the first line ---
.
However, it looks like in doing so the YAML code errors occur due to the formatting gets scrambled. For example:
variables:
debug: false
zwave_integration: "{%- if state_attr(entity_id, 'product_name') is string %}\n\
\ zwave\n{%- elif device_attr(device_id(entity_id), \"model\") is string %}\n\
\ zwave_js\n{%- else %}\n ozw\n{%- endif %}\n"
The solution is to store the script store the script manually in a YAML file. For example I can run both the UI generated script code and YAML stored script code side-by-side by using the following trickery.
homeassistant:
script ui-script: !include scripts.yaml
script: !include_dir_named scripts
Storing the above code in your configuration.yaml file would allow you to save my file as is inside of the /scripts directory at the root of your Home Assistant config. You could literally save my file to /scripts/inovelli_led.yaml and it should work.
January 22, 2022 changes:
1. Released this script as a Blueprint script!
2. Added Brightness "level" parameter to fields.
3. Little bit of code cleanup.
Updated script
Blueprint script
Z-Wave JS only!
That got it, thanks!
@BrianHanifin I’ve been following your scripts for years, I love them. QQ: why no white colour option?
I believe this is a limitation of the firmware. Inovelli provided us with a formula to calculate the proper values to send to their devices, and I do not believe white is one of the options available.
If you look at the Inovelli Switch Toolbox by nathanficus and the spreadsheet provided by Inovelli, you will see that there is no white color option.
Weird. It works as an option in the zwave mqtt integration.
I’m able to set effects and the dimmer LED to white on switches, dimmers, and fan / light combos through the ZWave to MQTT integration. White was added to the firmware recently, but I don’t remember what the minimum requirements are. My dimmers are running firmware 1.61 / 1.45 for reference. Feel free to use what I’ve done, if it helps. It was originally based on your work anyway, Brian. That Inovelli calculator has always been somewhat incomplete, since it doesn’t account for the effects switches don’t have.
According to the change log, white was added in firmware 1.45, so was not originally included and was added 6/22/20
It states you can set the LED bar to white by publishing a value of 255 to parameter 13.
Since it was added later on, I would think this would explain its absence from the Inovelli toolbox.
I attempted to confirm this after updating my dimmer to v1.57 Z-Wave MCU (Target 0)
and v1.45 Holtek MCU (Target 1)
. Unfortunately, setting the color to 255 still displays a red color. I also tried directly setting parameter 13 to 255 and nothing happened.
I also copied @kschlichter’s spreadsheet, and selected white as a parameter and the resulting value still turned the led red.
I have white as an option in the Z-Wave JS to MQTT web UI, but I’m on firmware 1.61 / 1.45 so maybe that’s the difference? Punching 33490687 into parameter 16 successfully set the switch effect to solid white forever.
I’m still on older firmware 1.47 Z-wave MCU and 1.41 Holtek MCU
I can confirm setting parameter 13 to 255 directly in the zwavejs2mqtt web UI changed the LED to white on my dimmer as well. Using the zwave_js:set_config_parameter service in Home Assistant also successfully changed the LED to white.
Initially, I updated to 1.47 to use the parameter 51 “instant on” option (remove 700ms delay). At the time, even though everything showed successful with the firmware update, that option didn’t work initially. When I applied the firmware update again, it worked the second time. My only other thoughts to get white working would be to try and apply the firmware updates again in case something didn’t stick, or possibly that there was a problem in 1.57 that got fixed again in 1.61
White is now included in the toolbox since Jan 5, 2021.
Are you using the version on git or did you clone it?
May 26, 2022 change: Added support for the White LED color.
* Support for the color white was supposedly added to the LZW31-SN dimmer [in Firmware 1.45 accoding to Inovelli](https://support.inovelli.com/portal/en/kb/articles/firmware-change-log-lzw31-sn-dimmer-switch-red-series).
* I ended up having to flash both LZW31-SN Z-Wave 1.61 and LZW31-SN Holtek 1.45 firmware twice before I could see white light.
@mwav3 and @kschlichter:
I tried the 1.61 beta Z-wave firmware instead of 1.57, and I tried reflashing the 1.45 Holtek firmware for good measure. 255 now produces white light! Thank you both for the suggestions!
@takissd and @RarelyComplete:
Thanks for the heads up. I don’t know why I didn’t think to update the firmware on my dimmer, but it works now.
Updated script
Not to completely derail this thread, but I have a question for those of you who upgraded your switches (with what I assume was the OTA method). I recently did one of my switches via OTA Z-Wave JS, using the ZWAVEJS2MQTT integration, and both targets updated successfully. However, I wasn’t expecting that I would have to exclude and re-include the device to get Z-Wave JS and Home Assistant to recognize it after the update.
Z-Wave JS did attempt to re-interview the device after the upgrade but eventually failed. Is this common? I have several more switches to update, but I’m thinking twice if I need to go through all this with each one.
No, I did not have to remove/re-add my Inovelli dimmer.
The Zwave JS 2 MQTT web interface showed a progress ring to show it was working on the upgrade for each firmware. I sent them over one at a time, waiting for the first to complete before uploading the second.
May 26, 2022 - update #2
1. This is the first release only supporting Z-wave JS!
2. Added support to send the same notification to multiple Inovelli switches and dimmers. (Thanks to Danny Schuh)'s contribution to the blueprint.)
From now on only the Z-Wave JS versions of this script and the blueprint will only get updates. The OpenZWave and Zwave integrations were officially removed from Home Assistant version 2022.4.
If you are still using either of the old integrations on a old version of Home Assistant, you can download the final version of that script here.