Need to not do something on Wednesday between certain times


#1

1) Give a description of the problem
I have a piston that monitors open/close sensors and turns on a siren if any of them open while location mode is away or night. I have started traveling a lot and forget to pause the piston on the mornings my lawn guys comes. When he or a crew member opens the gate to my backyard, they trigger the piston and my siren turns on. This scares the crap out of them and annoys my neighbors. I’d like to not have the siren sound on a particular day of the week between specific hours of the day but can’t figure out how to add an if statement to the statement that turns on the siren. I basically need something along the lines of:

“Turn on the siren switch unless it’s a Friday and the time is between 8:00 AM and 11:00 AM.”

For now I just turn the siren off after 60 seconds. This mitigates the neighbor annoyance factor but isn’t ideal.

2) What is the expected behaviour?
An If statement is used to not execute the “turn on siren” statement if it’s a certain day and between two specific times of day.

3) What is happening/not happening?
N/A

4) Post a Green Snapshot of the pistonimage

5) Attach logs after turning logging level to Full
(PASTE YOUR LOGS HERE THEN HIGHLIGHT ALL OF THE LOGS AND CLICK ON THE </> ICON TO FORMAT THEM CORRECTLY)


#2

What about something like this… adjust the conditions to your requirement.