[SOLVED] Rule to do something at certain time on certain day if an Item has a certain state

Essentially looking for rule markup for:

when
    Time of Day = 8PM && Day of the week is Monday-Friday
then
     if Kitchen_Light state == ON {
        Do Something
        }
end

Also, if there is a post with all the different examples of markup for common tasks in rules, that would be awesome to study!

Thanks!

That would be

when
    Time cron "0 0 20 ? * 1-5"
then
    if (Kitchen_Light.state == ON) {
        //Do something
    }
end

For more info on cron (specifically quartz cron that OpenHAB uses) see
http://www.quartz-scheduler.org/documentation/quartz-2.x/tutorials/crontrigger.html

2 Likes