rule "Keyfob button press" when Item FibaroKeyfob107_SceneNumber changed then // logInfo("keyfob", "Keyfob button press detected") switch (FibaroKeyfob107_SceneNumber.state) { case 1.0: { Nook_Puzzle.postUpdate('Puzzle') var onoff = NookLights6_Dimmer.state as Number if( onoff !=100 ) { NookLights6_Dimmer.sendCommand (100) } } case 1.1: { Nook_Puzzle.postUpdate('Normal') var onoff = NookLights6_Dimmer.state as Number val motion = NookMotion37_MotionAlarm.state.toString if( onoff !=0 && motion != 'ON') { NookLights6_Dimmer.sendCommand (0) } } case 2.0: { Nook_Puzzle.postUpdate('No_Lights') var onoff = NookLights6_Dimmer.state as Number if( onoff !=0 ) { NookLights6_Dimmer.sendCommand (0) } } case 2.1: { Nook_Puzzle.postUpdate('Normal') var onoff = NookLights6_Dimmer.state as Number val motion = NookMotion37_MotionAlarm.state.toString if( onoff !=100 && motion == 'ON') { NookLights6_Dimmer.sendCommand (100) } } case 3.0: { GreatRoomLights59_Switch.sendCommand (ON) } case 3.1: { GreatRoomLights59_Switch.sendCommand (OFF) } case 4.0: { BasementDoorLight58_Dimmer.sendCommand (0) Thread::sleep(200) MudRoomSwitches17_Driveway.sendCommand (OFF) Thread::sleep(100) FrontDoorSwitches20_Stoop.sendCommand (OFF) Thread::sleep(100) PatioLights7_Dimmer.sendCommand (OFF) Thread::sleep(100) MBPatioLights28_Spots.sendCommand (OFF) Thread::sleep(100) MBPatioLights28_MBR_Door.sendCommand (OFF) } case 4.1: { BasementDoorLight58_Dimmer.sendCommand (100) Thread::sleep(200) MudRoomSwitches17_Driveway.sendCommand (ON) Thread::sleep(100) FrontDoorSwitches20_Stoop.sendCommand (ON) Thread::sleep(100) PatioLights7_Dimmer.sendCommand (ON) Thread::sleep(100) MBPatioLights28_Spots.sendCommand (ON) Thread::sleep(100) MBPatioLights28_MBR_Door.sendCommand (ON) } case 5.0: { BasementLights16_Switch.sendCommand (ON) } case 5.1: { BasementLights16_Switch.sendCommand (OFF) } case 6.0: { WasherPlug11_Switch.sendCommand (OFF) } case 6.1: { WasherPlug11_Switch.sendCommand (ON) } case 7.0: logInfo("keyfob", "Keyfob 1 & 1 sequence pressed") case 8.0: logInfo("keyfob", "Keyfob 2 & 2 sequence pressed") case 9.0: logInfo("keyfob", "Keyfob 3 & 3 sequence pressed") case 10.0: logInfo("keyfob", "Keyfob 4 & 4 sequence pressed") case 11.0: logInfo("keyfob", "Keyfob 5 & 5 sequence pressed") case 12.0: logInfo("keyfob", "Keyfob 6 & 6 sequencepressed") default: logInfo("keyfob", "Other combination: " + FibaroKeyfob107_SceneNumber.state) } end