Help with what I thought would be easy

I want to turn off the lights when the power is below 30 and there’s not been motion on any of the listed sensors for 6 minutes. What I’m i missing?

I think your delay is happening after the motion trigger. What I do is after the initial trigger is to insert a 'wait for event' being the motion trigger in which a delay timeout period can be set also (6 minutes in your case)

You need to change the trigger event, to add in motion inactive (for all your sensors).

Currently, it will only trigger when power <30, and if at that time all motion sensors are inactive. There also needs to be something added to cancel the delay if there is motion, but that's another question, once this gets fixed.

How about this?

You need to have something that cancels the delay. So, before the end-if, add an ELSE Cancel Delayed actions. You also need to change the trigger to motion CHANGING. If you find that the power meter can fluctuate between < 30 and >30 then you need to change that trigger to changes too.

Try something like this

First motion detector triggers
If within 1 minute the second detector goes off then a notification is sent otherwise it just times out.

But this requires that the two happen within the set amount of time. The OP wants the state to remain in the triggered state for the period of time. Not happen within so much time of each other. Two different use cases. Yours is happens within. The OPs is "remains".

The power on the TV will be over 45 when it’s on. I set the trigger for 30 because if it’s below then I’m sure it’s off. Based on that I’m not sure if this applies...

Yes...but you do realize that this will turn the lights off whenever there is no motion and the tv is off, right? Not just when the TV just turned off. if that's what you're looking for, then your starting point was wrong and you;d have to redesign the whole thing.

Ah my bad, I get what you are saying.

In that case I think using a "wait for condition' with motion sensor active (with NOT condition) and a timeout should work?

No....the only way to get a timeout with a cancel is to use a delay with a cancel.

Cool thanks. I may have an automation that would need this so this is helpful.

Turning off the lights when the TV is off and there is no motion is what I want. Basically, if the TV is off and there’s no motion then we’re in bed and we left the lights on.

Thanks for the help!!

1 Like

No problem.

Ok this works and is a bit more elegant IMO than cancels and delays :smile:

So when the button is pushed, you wait for motion to become active (or 5 minutes), then exit the rule if motion is active? :thinking: Seems unlikely to do whet you want most of the time.

Well I'm assuming the switches are already on so it seems to me the easiest way is to exit the rule if there is motion, ie you want to keep the lights on. Otherwise the wait times out due to there being no motion and the lights get turned off. The button merely simulates the OPs trigger of the TV being turned off.