How to reset a condition


I want to turn on some lights when I deactivate my home alarm and the time is between sunset and midnight. The state of the alarm system is detected by a motion sensor that is tripped when the alarm is active. I want the Reactor sensor to trigger only when the state of motion sensor changes from 1 to 0.

This is my current conditions.

I have understood that the condition resets itself if I use the operator changes without terminal values but I don’t want the condition to be true when i activate the alarm (changes from 0 to 1).
What is the best way to solve my problem?



If you want the condition to be active only when you deactivate the alarm, you can simply test the condition state “equals 0” or “is FALSE” (or whatever makes sense for the state variable that has that information) directly on the arming state of the alarm. Remember that activities can only run once per state transition–once the ReactorSensor is tripped, that signal is sent once. It will not be sent again until the condition resets, which it will itself when you later arm the alarm. It does not matter that the condition shows “true” the entire time the alarm is deactivated–Reactor does not fire events continuously, only at the time the conditions are first met.

Also, you do not need the third condition. Your second condition “after sunset” automatically resets at midnight.



Thanks for your reply, I think I understand what you are saying.

But, I only want the activities to trigger at the time when I disarm the alarm and if the time/sun-conditions are true at that time. If i have a state condition for the alarm state = '0' and disarm the alarm in the middle of the day that condition will be true and stay so until sunset and then the sensor will get triggered? I want to find a way that the alarm state is the master condition.

Could one way be to have one condition for the alarm with operator changes without specifying terminal values and then combine that with another condition for the same device with operator state='0'?



Understood. So, put another way, you only want to allow the alarm disarm condition to be true if the sunset condition is met first. It is a sequence of conditions that must be met–first sunset, then disarm.

This is very easy to do. On the disarm condition, open the condition options by clicking the downward-pointing arrow icon to the right of the operand. There you will see an “Only after” label with a menu. Choose the sunset condition from that menu. Save and done.

What this does is have Reactor additionally look at the relative times that the tests became true, as well as the test values.

1 Like


Thank you. I was not aware of that functionality but that was exactly what I was after. Thanks for a great plugin!