Need assistance in combining rules to use the reset reaction
-
Patrick, I'm sorry if I'm bringing up something that has likely already been posted, but I'm just not finding it i the forum. Probably not using the right combination of keywords.
My rules are for the most part all migrated from luup Reactor on Vera, and are pretty much still written as such. I have numerous rules to turn on and off lights, and they were influenced by a video you posted on how to do it 3 or 4 years ago. In essence, there is a rule to turn on the lights when there is motion, and then another rule to turn the lights off after there is no motion for a specified period of time.
With the introduction of the reset reaction, is there a more elegant way to do this in one rule? This would have a great effect of cleaning up my rule base by simplifying and reducing the number of rules.
Running reactor-latest-22293
Home Assistant 2022.10.4
HAAS OS 9.2 -
The Reset reaction is analogous to the "is FALSE" activities in Reactor for Vera, and would be used the same way. They have the same applications and side-effects (e.g. preempting of contra-actions, etc.).
In practice, I have very few Reset reactions in my rules. Usually my "off" conditions are a good bit more complex than my "on" conditions, including different condition options/delays and constraints, and this all lends itself to separate rules, per the other discussion. I have so few, in fact, that I can't even think of where I might have used one.
-
The Reset reaction is analogous to the "is FALSE" activities in Reactor for Vera, and would be used the same way. They have the same applications and side-effects (e.g. preempting of contra-actions, etc.).
In practice, I have very few Reset reactions in my rules. Usually my "off" conditions are a good bit more complex than my "on" conditions, including different condition options/delays and constraints, and this all lends itself to separate rules, per the other discussion. I have so few, in fact, that I can't even think of where I might have used one.
@toggledbits this is a timely response as I'm investigating an issue with ONE SINGLE BLIND resetting itself at exactly 00:01:50 each night. My current belief is that it's in response to a gap somewhere letting a
reset reaction
be incorrectly utilized. I may review places where I'm usingreset reactions
based on this response. -
Remember that the log file logs all entity actions performed on all devices, so if you are looking for activity around a specific device, search the log file for its ID. Then examine the entries before it and you may see what rule/reaction is running, to more quickly lead you to the point.
-
You could in your reset action add a delay then have the light turn off after said delay. But if you want the light to turn off specifically when there is exclusively no motion detected, you can add a group in your reset reaction like the screenshot below and it will only turn off the light if there is no motion detected. @toggledbits can confirm if that is the correct approach.
-
T toggledbits locked this topic on