Hey!
A long time ago i found a script to simulate a sunrise, which i use with my rgbw bulbs. They start in low brightness red, then fade to bright yellow. My issue is that i’d like them to go to full brightness and to full white light, instead of a dim yellow, since i have rgbw bulbs.
Im no programmer, and im having a difficult time trying to understand exactly how this script works. If anyone can help me modify the saturation and brightness to 100% id appreciate very much it.
Here’s the script
var Integer Dimmer
var Integer DimmerCheck
var Integer HueVal
var Integer SatVal
var DecimalType hue = new DecimalType(0) // 0-360; 0=red, 120=green, 240=blue, 360=red(again)
var PercentType sat = new PercentType(100) // 0-100
var PercentType bright = new PercentType(0)
var HSBType light
Dimmer = 3
HueVal = 2
SatVal = 99
DimmerCheck=Dimmer
while(Dimmer<=90) // End up at 90% brightness
{
if (Dimmer==DimmerCheck)
{
bright = new PercentType(Dimmer)
hue = new DecimalType(HueVal)
sat = new PercentType(SatVal)
light = new HSBType(hue,sat,bright)
Milight_desklamp_1_Color.sendCommand(light.toString)
Milight_desklamp_2_Color.sendCommand(light.toString)
Milight_floorlamp_Color.sendCommand(light.toString)
Oliver_Underbordlys_RGB.sendCommand(light.toString)
Dimmer = Dimmer + 3
HueVal = HueVal + 2 // Increment from 0 to 60 over half an hour
SatVal = SatVal - 1 // Decrement from 100 saturation to 70% over half an hour
Thread::sleep(60000)
DimmerCheck = Dimmer
}
}
And as a pastebin
https://pastebin.com/FWZPC6ft
Thanks!