Any idea where I am going wrong? Missing an import maybe?
"
rule "Lamps On"
when
Item BR_Scene changed to "LMPS"
then
logInfo("Rules", "Running: BR_Scene change -> LMPS")
var DecimalType hue = new DecimalType(65) // 0-360; 0=red, 120=green, 240=blue, 360=red(again)
var PercentType sat = new PercentType(50) // 0-100
var PercentType bright = new PercentType(100) // 0-100
var HSBType light = new HSBType(hue,sat,bright)
sendCommand(CHCB606, light)
sendCommand(CHCB804, light)
sendCommand(SHCB805, OFF)
sendCommand(SHCB806, OFF)
end
rule "Lamps Dim"
when
Item BR_Scene changed to "LMPSD"
then
logInfo("Rules", "Running: BR_Scene change -> LMPSD")
var DecimalType hue = new DecimalType(65) // 0-360; 0=red, 120=green, 240=blue, 360=red(again)
var PercentType sat = new PercentType(50) // 0-100
var PercentType bright = new PercentType(50) // 0-100
var HSBType light = new HSBType(hue,sat,bright)
sendCommand(CHCB606, light)
sendCommand(CHCB804, light)
sendCommand(SHCB805, OFF)
sendCommand(SHCB806, OFF)
end
rule "Bedroom Dim"
when
Item BR_Scene changed to "Dim"
then
logInfo("Rules", "Running: BR_Scene change -> Dim")
var DecimalType hue = new DecimalType(65) // 0-360; 0=red, 120=green, 240=blue, 360=red(again)
var PercentType sat = new PercentType(50) // 0-100
var PercentType bright = new PercentType(50) // 0-100
var HSBType light = new HSBType(hue,sat,bright)
sendCommand(CHCB606, light)
sendCommand(CHCB804, light)
sendCommand(CHCB805, light)
sendCommand(CHCB806, light)
end
rule "Bedroom All On"
when
Item BR_Scene changed to "AON"
then
logInfo("Rules", "Running: BR_Scene change -> AON")
var DecimalType hue = new DecimalType(65) // 0-360; 0=red, 120=green, 240=blue, 360=red(again)
var PercentType sat = new PercentType(50) // 0-100
var PercentType bright = new PercentType(100) // 0-100
var HSBType light = new HSBType(hue,sat,bright)
sendCommand(CHCB606, light)
sendCommand(CHCB804, light)
sendCommand(CHCB805, light)
sendCommand(CHCB806, light)
end
rule "Bedroom All Off"
when
Item BR_Scene changed to "OFF"
then
logInfo("Rules", "Running: BR_Scene change -> OFF")
sendCommand(SHCB606, OFF)
sendCommand(SHCB804, OFF)
sendCommand(SHCB805, OFF)
sendCommand(SHCB806, OFF)
sendCommand(Dimmer_BR_Fan, 0)
sendCommand(BR_Activity, "PowerOff")
sendCommand(Outlet_BR_1, OFF)
end
rule "Lamps Off"
when
Item BR_Scene changed to "LOFF"
then
logInfo("Rules", "Running: BR_Scene change -> LOFF")
sendCommand(SHCB606, OFF)
sendCommand(SHCB804, OFF)
end
rule "Bedtime (ZZZZzzZzz)"
when
Item BR_Scene changed to "ZZZ"
then
logInfo("Rules", "Running: BR_Scene change -> ZZZ")
sendCommand(SHCB606, OFF)
sendCommand(SHCB804, OFF)
sendCommand(SHCB805, OFF)
sendCommand(SHCB806, OFF)
sendCommand(Dimmer_BR_Fan, 100)
sendCommand(BR_Activity, 19998758)
sendCommand(Outlet_BR_1, ON)
Thread::sleep(3000)
sendCommand(SHCB606, OFF)
sendCommand(SHCB804, OFF)
sendCommand(SHCB805, OFF)
sendCommand(SHCB806, OFF)
sendCommand(Dimmer_BR_Fan, 100)
sendCommand(BR_Activity, 19998758)
sendCommand(Outlet_BR_1, ON)
end
rule "Lamps on with Fan on Med"
when
Item BR_Scene changed to "LFM"
then
logInfo("Rules", "Running: BR_Scene change -> LFM")
var DecimalType hue = new DecimalType(65) // 0-360; 0=red, 120=green, 240=blue, 360=red(again)
var PercentType sat = new PercentType(50) // 0-100
var PercentType bright = new PercentType(100) // 0-100
var HSBType light = new HSBType(hue,sat,bright)
sendCommand(CHCB606, light)
sendCommand(CHCB804, light)
sendCommand(Dimmer_BR_Fan, 50)
end
rule "Lamps on with Fan on Med"
when
Item BR_Scene changed to "LFH"
then
logInfo("Rules", "Running: BR_Scene change -> LFH")
var DecimalType hue = new DecimalType(65) // 0-360; 0=red, 120=green, 240=blue, 360=red(again)
var PercentType sat = new PercentType(50) // 0-100
var PercentType bright = new PercentType(100) // 0-100
var HSBType light = new HSBType(hue,sat,bright)
sendCommand(CHCB606, light)
sendCommand(CHCB804, light)
sendCommand(Dimmer_BR_Fan, 100)
end
"