Okay, I think what makes more sense here is just to have a setting "Let setStatusLed Manage LED Mode" or something like that. When this is on, setStatusLed will auto it off or auto it on. Otherwise, it will leave it to whatever was set via the setSwitchModeNormal and setSwitchModeStatus commands.
The reason for this is because it is not really a preference but a state. If I make the on/off states as part of the preference then I have to update the preference any time the switch mode commands or setStatusLed is called. If I just have the allow-to-be-managed component as a preference I don't have to do any updating and you get the same functionality.
So, I've been thinking about this more @JohnRob and now I need you to tell me why the parameter 13 needs to stay at 1 even when you turn the status LED lights off. Why does it matter? The very next time you set a status LED with setStatusLed it also sets parameter 13 back to 1 if it needs to.
And in the meantime if you don't let the driver manage parameter 13 then the setting to have the switch show the bottom status LED on when the load is off breaks because the parameter 3 only works when the switch is in normal mode.
So if I give you what you want it breaks the bottom LED on when load is off functionality.
Why does it need to stay on if the next time it is needed it is forced on anyway? Or does the OOB driver not do this? My driver acts like this:
if (state.statusled1 == 0 && state.statusled2 == 0 && state.statusled3 == 0 && state.statusled4 == 0 && state.statusled5 == 0 && state.statusled6 == 0 && state.statusled7 == 0) {
// no LEDS are set, put back to NORMAL mode
cmds << zwave.configurationV2.configurationSet(configurationValue: [0], parameterNumber: 13, size: 1).format()
}
else {
// at least one LED is set, put to status mode
cmds << zwave.configurationV2.configurationSet(configurationValue: [1], parameterNumber: 13, size: 1).format()
}
So, it when it needs to it sets parameter 13 back to 1 when necessary. The reason it turns it off when no LEDs are set is so that the bottom load LED can show when no LEDs are set. The bottom load LED (parameter 3) only works with the switch is in normal mode i.e. parameter 13 is 0.
Here's what we want:
Status lights to be set on or off by RM4 Rules.
When the Status lights are all not set (i.e. all ths status lights are OFF) we DO NOT want the dim lights to illuminate.
Current Situation
When all status lights turn off, the Dim indicator goes on if either the dimmer is manually changed or Z-Wave changed.
Status Light ON:
Status Light OFF then dimmer turned off (even though it was already off)
The issue is at night at a distance its difficult for the wife to tell if a status light is on or the dimmer is on (even though there is a color difference)
Got it. So when the load is on you don't want it to show load ever. You never want to see the load indicated on the LEDs because for your use they are strictly for status (or you want them to be after the change) and you don't want somebody to confuse two or any number of load status lights with actual statuses. Fair enough.
So... you understand the problem, right? I'm going to make the change but if you see somebody with an issue because I gave this to you and the community I would like you to help me explain it. I'll post it but in the release thread but inevitably somebody will not read it and ask.
Here are the issues that this change can cause:
Bottom load off LED can now possibly fail because switch mode status is pinnable or sticky or whatever we want to call it
Set Status LED can now possibly fail because switch mode normal is pinnable or sticky or whatever we want to call it
It is programmatic because of the two reasons I mentioned.
First, if somebody tries to use setStatusLed and that method is not allowed to turn status LEDs on nothing happens. This is confusing to the user. It's also easier for the user so they don't have to set the switch mode first and then set the status LEDs.
Second, it is convenient if somebody tries to use the preference to show the bottom LED on when the load is off. If the switch mode doesn't change to normal when the status LEDs are set to off then the bottom LED never comes on either.
I understand that the HomeSeer HS-WD200 and the ZWP dimmer are the same Dragontech OEM device. However, it doesn't appear to me that the status LEDs can be managed with the ZWP the way they can with the HomeSeer. Has anybody managed to use the status LEDs on the ZWP device? TIA....