Limit Piston for door sensor to certain days


#1

1) Give a description of the problem
Trying to make my piston work only Sunday -Thursday and then disabled on Friday up until Sunset until Saturday until Sunset

2) What is the expected behaviour?
When sensor contact changes to open turn on lights should only be active Sunday-Thursday, and then Friday from Sunset until Saturday Sunset it should not be active
3) What is happening/not happening?
Cant figure out how to have it not work sunset to sunset Friday-Saturday

**4) Post a Green Snapshot of the piston![image|45x37]


#2

Maybe something like this:

IF Sensor's contact changes to open   <-- Trigger
Then
    IF $dayOfWeek is between 0 and 4  <-- Condition (Sun-Thu)
        Then Turn on Switch 7
    END IF
    IF $dayOfWeek is 5                <-- Condition (Fri)
       and
       Time is before sunset
           Then Turn on Switch 7
    END IF
    IF $dayOfWeek is 6                <-- Condition (Sat)
       and
       Time is after sunset
           Then Turn on Switch 7
    END IF
END IF

#3

OK, Let me know if this looks good. Thank you for all your help


#4

It looks good! Your last piston should send the command 24/7… except for Friday night, and Saturday day…


#5

Thanks for all the help!