Do two different things based on the timed state of another


#1

1) Give a description of the problem
I have a piston that works, but I feel like it might be clunky or worse may not work on rare situations.

2) What is the expected behavior?
Here is what I am doing
If I am present for 15 minutes
then
if object one is on then do X

If I am present for 15 minuntes
then
if Object 2 is on then do Y

I have one piston with each of these situations. It would be unlikely that Object 1 and Object 2 would both be on. but I suppose its possible. Right now they are two fully independent items in the same piston, I thought about nesting like this

If I am present
then If
Object 1 is on
do X
Then if
Object 2 is on
do Y

But I think if the 1st if is true it would never process object 2, right? I really want both items to be processed 15 minutes after I get home.

Maybe I’m overthinking


#2

That will work. Three IF’s. Two nested inside the main one. The two inside ones at the same level (they are not nested in each other).

IF Present = present for 15 minutes
THEN

IF Object 1 THEN do X
IF Object 2 THEN do Y

Make them Synchronous if you really need it (only reason would be if there were Waits in there or maybe a long running process) but if you do it that way they will both fire after you’ve been home for 15 minutes.