Repeating rule not really repeating

I have created a rule to check if we are still up, and if we are not (have gone to bed), to power down the house. just added a few devices at the moment.

The problem is, its not repeating as it should. Have I got this totally wrong on how it should work?

So I have motion sensors, which if triggered, via a trigger rule set a virtual switch of "Still Up" to true. This is automatically reset to false every 30 minutes, with a cancel if it gets motion. This virtual switch seems to be all correct.

So I created the power down rule, with a repeat every hour, and a cancel on Truth based on the time of the day and the StillUp flag as follows:

When I look at the logs for the rule, it shows it is firing at 9pm (as expected) but then - thats it - no repeating at say 10pm, 11pm, midnight etc:

What have I got wrong?

Looking at your rule I think the repeat should be first followed by the delay.
Also chose stop repeating for the repeat action

Wait....what are you trying to do? You do not need to repeatedly check if the conditions have changed. That is handled by rule machine. Rule machine subscribes to the events that you have in the IF part and if any of those change, it will evaluate the rule.
So, why do you need a repeat action at all? This would basically turn off the tv every hour when the StillUpFlag is off and the time is between those times. Do you want to turn the TV off every hour?

Basically....

After 9:30pm, if no motion sensor has detected any movement in the last 30 minutes, power down some devices.

So if its 9:30pm and we are out, devices get powered down...
if its 9:30pm and we are up, devices stay on...
If we go to bed at say 10:30pm, the devices will power down 30-40 minutes after that as no furher motion detected

This carries on till the early morning when other routines take over (morning routines)

Yeah, that's not a repeat action. Repeats only apply to actions, not conditions. You don't have to schedule when the rule is going to check for no motion. The rule "subscribes" to motion events from the motion sensors and knows about them instantly. So, take the whole repeat thing out and it should work.

This might help:

That will only work if you do NOT try to use repeats. The motion isn't the part of your rule that's broken. It's the repeating part.

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