For some reason, I can't wrap my head around how to write this rule. I basically want to turn off a switch that was turned on digitally if there has NEVER been a motion in the room for a certain amount of time.
Basically, if Closet was turn on through a digital switch, but no one has been in the closet to turn on the motion sensor, how can I automatically get closet to turned off after 5 minutes
For the Actions, you may want something like this, though I am sure there will be a better way to do this... Also, ignore the devices I have used, the rule does not make sense as an automation.
Another trick I use is to trigger a virtual motion sensor that is part of a zone setup which is then used in Room Lighting, so using whatever motion timeout may be configured. You could trigger a virtual motion sensor on the digital on for the switch.
If you lookup the motion sensors you mention in the Wait For Expression, did they activate around the same time you turned on the bulb via the Dashboard? Perhaps within a couple of minutes of turning on the bulb (2 + 8 minute wait)?