Will change in compared expression value trigger a piston?


#1

1) Give a description of the problem
Not a problem per-se, but I am wondering if the way I coded this piston will work as I expect regarding the triggering of the statement #31.
2) What is the expected behaviour?
There are two conditions I want to use to turn off a fan (Whole House fan in example). The 2nd case logically is when the outside temp RISES about the indoor temp (Motion Sensor 7 in example). However, I coded the condition to test if the indoor temp drops below the outdoor temp, so that (presumably for efficiency) only the indoor sensor triggers the piston.
What I am wondering is the case where the indoor temp is stable, and the outdoor temp rises – will the piston get triggered to evaluate in this case? Logically the two ways of coding the test are equivalent but I suspect resulting piston triggering behavior may not be… so I thought I’d ask.

Asked more simply: In statement 31 must the Motion sensor’s temperature drop to trigger the piston, or will any change in temperature trigger it (and then evaluate whether it logically dropped vs the evaluated expression that includes the SWS temp).

3) What is happening/not happening?
See question description above.

4) Post a Green Snapshot of the pistonimage

5) Attach logs after turning logging level to Full
REMOVE BELOW AFTER READING
If a solution is found for your question then please mark the post as the solution.


#2

The piston subscribes to the temperature attribute of the motion sensor. That means when a temperature event is received the piston fires. Depending on how the device handler is written, it might be that any new temperature reading results in a temperature event, or it might be that only changes in temperature result in a temperature event.

It is then down to the piston to do the comparison. I’ve just double checked the piston code and it evaluates as true if the previous value of the temperature was greater than or equal to the current outside temperature, and the new value carried in the event is less than the current outside temperature.

So it is your second option.


#3

Excellent. Thanks so much for the speedy response.