Basic rule to check thermostat temp then perform an action

I've created a basic rule that checks a thermostat's temperature, waits 30 mins, then turns off the thermostat.

This works perfectly well for the first execution, then subsequent executions the timer is reset every temperature check (I assume if the value is different).

The rule is written as:

...using the "Temperature has risen above..." method.

I can lower the timer from 30 mins, but this isn't my intention.

The Basic Rule logic seems to reset if I either shut off the thermostat myself and/or 30 minutes below 68F is reached.

Any assistance is appreciated.

Thanks!

Your rule is constantly being re-triggered every time a new temperature reading is logged. This cancels the previous wait and restarts the count down. Unfortunately, you'll need to either create a two more basic rules and modify this rule or move everything to Rule Machine. If you want to use Basic Rules, you'll need to create a virtual switch. Have that virtual switch turn on when the temperature rises above 68 degrees and turn off when the temperature is below 68 degrees. Then, add a restriction to this rule that the switch must be off to run.

If you move this rule to Rule Machine, you would only need one rule to make everything work using a Private Boolean and a Required Expression. Your rule would be:

Required Expression
Private Boolean is True

Trigger
Same as the current rule

Action
Set Private Boolean False
Wait for Event - Elapsed Time of 30 minutes
Turn off Thermostat
Set Private Boolean True

In the Rule Machine rule, setting the Private Boolean to False in the first action will prevent the rule from re-triggering until your countdown is finished. At the end of the actions, it resets the Private Boolean to true so that the rule can run again once the trigger activates again.

4 Likes

Rule Machine sounds great, but I'd rather just keep things as simple as possible.

I already have a virtual switch for a time based thermostat control. This seems significantly less of a learning curve and will thusly be less error prone for my lizard brain, hence it'll more durable and sustainable.

Thank you!