Can someone please explain "Only when" with an example?


#1

I think that I have a very basic understanding of “Only when” statements. But I would like more discussion with an example piston to make sure I have it right in my brain. Thanks.


#2

Only when is restrictions…


#3

I’ve had issues with “only when”. I find it works better with a trigger and “And”

IF motion sensor changes to active
AND time is between X and Y
THEN turn on patio light


#4

I copied the following from another user. I think I understand the use here. I just wanted to be sure this is solid.


#5

some may have seen this:


#6

The difference between using a condition and a restriction is that the restriction will prevent the piston from being fired while the condition will still be evaluated after the piston is triggered. Also, you are not always able to distinguish a trigger from a condition. If all you have are conditions, they become triggers, even if you don’t want them to be. That’s when you can move them to restrictions.