New to HE, 2nd day.
I'm trying to migrate my pistons from WebCoRE to Rule Machine and for the most part I've had a good degree of success, however I am struggling to replicate the attached piston in Rule Machine.
Basically this is a lighting automation that turns on the bedroom lights on motion, but not if the bed has been occupied in the last 3 hours. The 'Occupancy' sensor is driven by a Sleep Sensor that turns a virtual switch 'On' when there is someone in the bed, and then 'Off' when the bed is unoccupied. The reason I have a 3 hour timeout is that sometimes if one person gets out of the bed you wouldn't want the lights triggering immediately, and if you move around during the night sometimes the sensor can toggle.
In Rule Machine I'd like to be able to set the trigger as the motion sensor detecting motion, but a condition would be that the 'Master Bedroom Bed Occupancy' switch has been 'Off' for at least 3 hours, otherwise the rule shouldn't run.
Does anyone have any advice please?
I did look at this thread - although it seems to refer to an action happening if a sensor has been open for longer than x, rather than action 'not' happening because a sensor has stayed the same for x.