First, please use code fences
Second:
rule “Going_to_Bed”
when
Item Light_FF_Bed_Wall changed to ON
then
if (now.getHourOfDay() >= 21 && now.getHourOfDay() < 23) {
createTimer(now.plusMinutes(15), [ |
Light_FF_Bath_Vanity.sendCommand(OFF)
Light_FF_Dining_Wall.sendCommand(OFF)
Light_FF_Kitchen_Sink.sendCommand(OFF)
Light_LR_West_Master.sendCommand(OFF)
Light_FF_Bed_Wall.sendCommand(OFF)
])
}
end
How that works.
As you said yourself, you want to detect if the bedroom light is turned ON so that’s the rule trigger
Then we check if the hour of the day is >= 21 or < 23
Then we create a timer that will run in 15 minutes time containing the commands to turn the lights OFF
Enjoy