Rule Machine Version 1.7.16 Released
This version fills out the Set private Boolean and Capture / Restore features of Rule Machine:
- Set private Boolean, when delayed in a Rule, now has the option to Cancel on rule truth change
- Restore now has a delay option, and if delayed, the option to Cancel on rule truth change
Both Set private Boolean and Capture / Restore can be used in similar contexts and for similar reasons to other automations that involve reversing some action after a delay, pending cancellation.
For example, a variation on the standard method of having motion controlled lights, where motion turns on the lights, and they are turned off after x minutes of no motion, is to use Capture and Restore instead of simply turning the lights off. Say it’s in the evening, and a room has lights set to a low level. But you want them to brighten when motion occurs, and subsequently to return to their previous level. This can be done with this rule:
Conditions: motion active
Rule: motion active
Actions for True: capture lights; set lights to bright
Actions for False: restore after 2 minutes, cancellable
As usual, this is simply an update for Rule.
Rule github: https://github.com/bravenel/Rule-Trigger/blob/master/smartapps/bravenel/rule.src/rule.groovy. Save and Publish for me.
@lflorack, As we discussed before, the delay for Restore makes you automation very simple now.