Ha, that’s how I felt looking at your driver! Took me a while to figure out what a lot of it did. All I did (besides making the buttons work in what I’d consider a more Hubitat-like fashion) was add a couple custom commands to allow you to set the “regular” and “notification” LEDs via these commands. That way, you can set them to arbitrary values using Rule Machine or similar without needing to worry about having created child devices with your desired settings ahead of time (and you can use the “regular” LED as a sort of “permanent notification” as I do, where its color corresponds to my hub’s mode and the “real” notifications override that but go back to this when cleared). These commands/functions just modify the same Z-Wave parameters that the device preferences or child devices for the same parameters do (definitely had to copy your math to figure out parameter 16…), just using a function instead of a preference or child device.
The child devices are definitely easy to use, and on SmartThings they’re pretty much a necessity unless you have webCoRE or something to run a custom command. They work fine on Hubitat too (disclaimer: I think something I modified prevented my driver from being able to create them, but I’m not sure why since I didn’t touch that part of the code; still works if you use the original driver and then switch). However, since Hubitat has Rule Machine built in, which has the ability to run custom commands, people who are comfortable with that could just change the notifications that way instead. I think that’s what the poster was asking for…but it’s definitely something I wanted to do.
I haven’t used my
setNotificationLED (parameters: color, level, duration, effect) command above yet—basically a way to modify parameter 16 using a command—but just added it since I thought that’s what they asked for; I did, however, add a command called
setDefaultLED (parameters: color, level) a while back that I had been using. Here’s an example I was talking about that syncs the LED color and level–so basically modifies parameters 13 and 14–with my location mode:
The other command could be used in a similar fashion for “real” notifications (but again, so could turning on a child device if you have one created—that wasn’t an option at all here and is why I did this first).