EDIT (November 2020): After using these for the better part of a year myself, I decided that, while interesting, the "standard" functionality provided by the child devices isn't as useful as I expected. While I still maintain custom drivers for some Inovelli products on my GitHub, I have overhauled these to work in a different manner. Inovelli, however, has adapted some of these ideas as options into their own driver, so the need for the driver here as originally envisioned is also probably less.
After using the Inovelli LZW31-SN (Red Series dimmer, the model with scenes and notifications), I wasn't 100% happy with any driver I had used, including my previous custom modification of the stock Inovelli driver. Additionally, while I like Hubitat's stock drivers, they don't include this particular device, and even if they did, the driver wouldn't support more than double-tap unless they change their minds or the device capability model.
Then it dawned on me: the LED bar in notification mode is basically an RGB bulb, so why not make it a child device with these capabilities (color, level, and effects), and then you can control it from pretty much any "standard" app via the typical commands? While I was at it, I also made the "default"/on-mode LED a child device (supporting color and level, no effects) and the "off-mode" LED another child device (supporting level; color comes from the "default" LED). I can't tell if this is such a great idea that I'm surprised nobody has thought of it or if it's such a crazy idea that someone did think of it and dismissed it for that reason. The big advantage here, in my opinion, is that you don't need to use any custom commands to use the notification (or LED color/level) features of this device if they are exposed in this manner! (Or almost. There isn't a standard capability matching the "duration" part of the effect, but it will provide a default if you don't change it. And the effect commands are indeed standard on Hubitat but perhaps little-used...)
In any case, here are the drivers:
You'll need to do the following:
Add the Red Dimmer (LZW31-SN) driver, https://raw.githubusercontent.com/RMoRobert/Hubitat/master/drivers/Inovelli/Red-Dimmer-LZW31SN-Advanced.groovy
Add the Notification LED child driver, https://raw.githubusercontent.com/RMoRobert/Hubitat/master/drivers/Inovelli/Inovelli-Notification-LED.groovy
Add the "Default" ("On") LED child driver, https://raw.githubusercontent.com/RMoRobert/Hubitat/master/drivers/Inovelli/Inovelli-Default-LED.groovy
Add the "Off" LED child driver, https://raw.githubusercontent.com/RMoRobert/Hubitat/master/drivers/Inovelli/Inovelli-Off-LED.groovy
After changing your device to the "Advanced Inovelli Red Series Dimmer (LZW31-SN)" driver (or the corresponding one for the switch) from step 1 (or if it gets added with this driver in the first place), click "Save Preferences" on the device page. This will update all Z-Wave parameters with your preference selection and also create child devices unless you disable that option.
The default and "off' LED drivers should be pretty self-explanatory. Changing color on the deafult will change the LED bar color for both "on" and "off" states (Inovelli doesn't differentiate there), and changing the level will affect the brightness for the on or off state status, depending on which child device you manipulate. Turning the child device off will set the brightness to 0 (turning off the LED bar), and turning the child device on will set it back to the last level you had it at (assuming the driver "remembers" it correctly--this is not not something the device can natively do).
The notification LED child may require more explanation. My recommendation would be to use it in this way:
- First, either use
setLevel, or use
setColor(this is really equivalent to setting hue and level; note that Inovelli does not support saturation, so that value is ignored).
- Optionally, call
setDurationto set the effect duration in seconds. It will default to the highest value Inovelli's documentation suggests, 255, which I think might be "indefinite" (though in my opinion, given the way the dimmers work, you should manipulate the default LED instead of counting on any notification to really be indefinite).
- Last, call
setEffectwith your desired effect name or effect number, with the mapping as follows:
[0: "Off", 1:"Solid", 2:"Chase", 3:"Fast Blink", 4:"Slow Blink", 5:"Pulse"](you should also see this as the
lightEffectsattribute value on the child device). Alternatively, you could use
on()and use the preference on the device to set a default effect for this command.
If you want to stop the effect,
setEffect("None") should both work, as will
off(). The notification will, of course, also stop after the timeout you've configured. Because the switch does not "reset" the notification parameter after this, do not count on the "Current States" of the notification LED child to show you what is currently happening, and I wouldn't use them as triggers in rules/apps. I would treat the child device only as something to manually manipulate via rules or apps.
All the functions the child devices can provide are also exposed as custom commands on the main/parent device. The child device states will not get updated when you do this, but again, I do not recommend relying on those states for any triggers/subscriptions/etc. As metioned above, you can disable the option to create the child devices and only use the parent device with these commands if you want.
Finally, as with my other driver, button numbers and events are different from Inovelli's drivers. Taps up are buttons 1, 3, 5, 7, and 9 pushed. A hold up is button 1 held, followed by button 1 released on release. Taps down are buttons 2, 4, 6, 8, and 10 pushed, plus button 2 held and released for holds and releases (so 1-5 taps up are odd button numbers 1-9, and 1-5 taps are even numbers 2-10; the button events for single taps, holds, and releases match Hubitat's conventions). The config button is button 11 pushed.
Let me know if you notice any problems! (And coming soon, probably something similar for the Red Series switches! And I could do the same for the default and "off" LEDs on the Black Series to let you squeeze psuedo-notification features out of those...)