I’m in the process of writing an app that uses the switch LED to show status of sensors and I ran into two issues:
Please add saturation as a possible value in startNotification (param 8 or 16). You have it as a setting in the normal led color but not there. I was going to set the LED to notify white when I realized I can’t. Maybe reserve 4 bytes for Hue, Saturation, Brightness, and Effect and another few bytes for auto-off and other fancies? In any case, expose saturation please.
Please normalize the effect list between dimmer and switch. As it is now, fast-blink on switch and chase on dimmer both use 02 as the sub-value. Just use the same list of effects on both devices and ignore any effects (chase for now) on the switch. Alternately, start at 16 or 128 with dimmer (multi-led) effects? In any case, don’t make me add a conditional when I want to blink depending on it being a switch or dimmer.
2nd param on startNotification
Looking at the driver, I don’t really see how the 2nd optional param (1st in stopNotification) does anything at all. What’s the story there?
What platform are you using (guessing Hubitat based on some terminology you’ve used), or what Z-Wave parameter are you looking at? I only see parameters for LED color and level. The setColor() command on ST and Hubitat has to take a saturation value because that’s how the command is standardized, but the Hubitat driver (and probably ST DTH, but I don’t use that) ignores it and just uses the hue and level — the two remaining components — instead.
That would make thing so much easier for my brain (and custom driver) — and ultimately with calculating a parameter value that would do something like intended on both (my preference would have been to make “2,” which in my math corresponds to chase on the dimmers, do either fast blink or pulse — doubling up on another effect number but making the rest the same). I suppose I can understand why they did this and it’s probably too late to change it without breaking a bunch of things now but…
Hubitat here and only commenting on the lack of saturation in startNotification. setColor() works fine and I can easily set the dimmer color using saturation but I don’t care about that since I’m writing a notification app
I’m not sending Z-Wave commands directly, just using their official driver but looking that their driver code and the effect calculation, there just doesn’t seem to be a way to set saturation and this no white or pastel notification colors.
The notification parameter, as you may have seen, is built from four parts: color, level, duration, and effect. As with the “regular” LED bar, color is just hue, so saturation is not available. One specific “color” value (or range?) was supposed to white, but that appaerently didn’t make it into the firmware, even though I think that did make it into some documentation. I didn’t see it mentioned in any of the beta firmware release notes, but maybe in the future? See this post for more:
Thanks for the post link! I hope they don’t just reserve a range of color (hue) to be white. HSB/HSL is really three dimensions to express the full range of color so collapsing some of that cube into less would be a little sad.
I was going to update my Hubitat Switch Dashboard to add the white color when I saw this. Sigh. Who codes this? I know you are trying to squeeze in a lot but would using the same switch statement take more space? Why why why make it even more complicated?