Digital Switch on - no motion

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 trigger I expect you want to use this:

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.

I find it easier to split rules, so for off I'll use something like:

A seperate Rule Machine rule that activates when the light comes on.
Light on, motion inactive 8 minutes, light off.

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.

1 Like

@Ranchitat.

But with your example, at some point, there had to have been motion because you are waiting for the motion to become inactive.

Hmm, that is strange.
Originally this is what it looked like, and it worked as expected:

Now it looks like this, and I can't say for sure if it's still working the same or not. :thinking:
image
Have to wait till everyone goes to bed and test it again.

1 Like

Empty room, turned it on from a dashboard and 10 minutes later, the rule turned it off.

So it works... I guess :man_shrugging:

1 Like

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)?

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.