I use the ‘after x minutes feature’ in a rule actions. As far as I can see from logging, when the rule fires it schedules some process.
In some cases I would like to withdraw this. Adding an 'and $enabled == “true” ’ to the rule condition and setting this property
to false after scheduling doesn’t unschedule. Is it possible to unschedule the rule by another rule, or how can I do this?
-
How to unschedule a rule?
-
what about trying to put the variable $enabled as first condition
WHEN $enabled = true …so you will be able to set the $enabled variable with another rule (WHEN … THEN set $enabled = true …) or via buttons device for example
pimatic v0.9 has been released!
Support Pimatic and get some free stickers
Like us on Facebookmake it so !
-
To answer your question: no that’s not possible.
You should change the rules in two rules I think.
For exampleif PIR is active switch lamp on and switch off lamp after 30 seconds
would be
if PIR is active switch lamp on if PIR is not active for 30 seconds switch off lamp
-
I will make it more concrete by this example:
when <some event> and if $enabled == true then switch on lamp after $x minutes
This rule should be unscheduled by setting &enabled to false after the rule is scheduled.
If this is not possible it might be worth a feature request. -
and like this:
when <some event> and if $enabled == true then set $lamp_var to true after $x minutes when $enabled and $lamp_var switch off lamp
-
@rikki78 That’s a nice idea. The $lamp-variable should be reset of cause. Making rules with Pimatic is something like a Puzzle😉