I’m trying to set up a light to check if the light is already on and at a certain time change the color temp. Is my code wrong? I’ve tried a few different ways but I can’t get it to work properly. I have a script similar to this that just turns the lights ON at a certain time without the check, the check is the part I can’t get working. Its a Milight connected to a milight box1. Thanks!
// If lights are on, at 8:30PM change colortemp to 50%
rule "LightTemp50"
when
Time cron "0 30 20 1/1 * ? *"
then
if (RgbwwColorZone1_Brightness = ON) {
RgbwwColorZone1_ColorTemperature.sendCommand(20)
}
end
// If lights are on, at 8:30PM change colortemp to 50%
rule "LightTemp50"
when
Time cron "0 30 20 1/1 * ? *"
then
if (RgbwwColorZone1_Brightness.state == ON) {
RgbwwColorZone1_ColorTemperature.sendCommand(20)
}
end
Yeah I was just running into that idea, I assumed ON would work since it has that value on the control in paperUI. I’m still playing around with it to see what I can do, so like this?
(RgbwwColorZone1_Brightness.state => 1)