when I developed the binding, I thought of the Nightmode functionality to be similar like the âdiscoâ functionality. If you turn the function off, the previous state should be restored (which is âONâ in your case). If you think that doesnât make sense we can discuss an altered behavior.
thx for your response!
Yes, restoring the previous state sounds ok, but it doesnât work somehow. For example:
Everything (Brightness, NightMode, Color) is OFF > Switch NM ON > LED Turns on in NM, correct.
Switch NM OFF > LED turns OFF and immediately ON again (in NM),
Another thing I have some problems with is how to correctly switch OFF a colored light so that it starts in WhiteMode next time I set Brightness ONâŠ
Right now e.g. after setting
sendCommand(LED_Kueche_Color, new HSBType(new DecimalType(0),new PercentType(100),new PercentType(100)))
I have to do
sendCommand(LED_Kueche_Color, new HSBType(new DecimalType(0),new PercentType(0),new PercentType(100)))
Thread::sleep(500)
LED_Kueche_Brightness.sendCommand(ON)
Thread::sleep(500)
LED_Kueche_Brightness.sendCommand(OFF)
to make sure the LED is white next time I switch it ON with LED_Kueche_Brightness.sendCommand(ON).
Otherwise it starts (in my example) in red color.
Hi Stefan,
thatâs how milights work, actually. Everytime you switch off a lightbulb the last chosen color is saved and restored upon switching it on again.
yeah I know, but in the 1.9 binding there was a âWhiteModeâ which I used as the standard light switch.
That âneutralizedâ my colors or brightness changes
rule "Fernsehlicht_Helligkeit"
when
Item l_brightness_wz_fernsehlicht received command
then
if (receivedCommand==100) {
Thread::sleep(500)
l_color_wz_fernsehlicht.sendCommand(new HSBType(new DecimalType(0),new PercentType(0),new PercentType(100)))
}
end
I hope thatâll do.
You can of course fiddle around with unbound items to receive the commands and then adjust the lights in this way.