Rule Machine repeat every Question

I have a routine that checks to see if the heater is on while the light is off. If it is, it waits for the cooldown cycle (pulling 7 watts) to end, then power cycles the plug attached to the heater to reset the heater to off. Sometimes there's a brief zero watt signal from the plug between the end of heating and start of cooldown cycle.

This routine prevents people from accidentally leaving the heater on (it's easy to miss the "on" light). I want also to be able to repeat the check while the light is off, in case someone turns on the heater without turning on the light.

Since repeat every requires a time interval, I set one. However, I have two questions:

  1. Is the interval a "minimum interval"? That is, does it wait X seconds when it hits the repeat every, or does it immediately repeat if it has been more than X seconds within the repeated routine?
  2. Does my routine do what I described above?
    Thanks

I suspect that your rule -- as currently constructed -- doesn't quite do what you've outlined above. I'll try to walk you through some subtleties...
For starters, turning On the Bath Master switch (blue arrow event) will cause the IF block to execute, as expected:


with the ELSE (orange outline) block being skipped. So far, so good.

Where the rule departs from your intended flow, I believe, is the case when the switch is turned Off, causing the ELSE logic branch to execute:


Even if, as in my example, the heater's power level already exceeds 40, the rule will (a) wait for such an Event (which may never come, if the heater is at max power), and then (b) repeat every 30 seconds regardless, as shown in the screenshot. (At least until the switch returns to On.)

I'll do my best to rework the rule a bit, such as replacing "Wait for Event" with "Wait for Expression", and ideally doing away with the need for so much branching, nesting, and repetition.

I'm proposing the rule be modified thusly:

  • No need for repeat actions or cancels
  • Triggers whenever switch changes or heater comes (back) on
  • Switch: On? ► Heater: On (harmless if already on)
  • Switch: Off? ► wait for next power drop ► cycle socket

I think this revised rule captures the spirit of your overall intent, in a more streamlined and logical fashion, without adding to hub load. Let me know if I've overlooked something.