Dayoff change Variable by Date

variables

#1

1) Give a description of the problem
I am looking for suggestions on how to improve this type of piston (see below). I am not sure if this is the best approach. Is there a better way to input the dates?

2) What is the expected behaviour?
Based on a date occurring a Variable is changed from FALSE to TRUE. This Variable is used in other Pistons to determine if the outside light should come on in the mornings etc. Wake up music should play etc, etc, etc.
Please note I have another Piston that resets the Variable to False each day.

3) What is happening/not happening?
I have not tried it, so I am not sure it works correctly yet.

**4) Post a Green Snapshot of the piston!

5) Attach logs after turning logging level to Full
None Yet


#2

Well, I see two problems you’re going to have. #1, you have no method of setting the variable back to false. And #2, this piston is going to run every day even though it doesn’t have to. Also, Your date is trying to fall between a range of no dates. That isn’t going to work. Wouldn’t it be easier to do this.

This way, your piston only runs on the date in question and 24 hours later, it will turn back to false. If you don’t want it to change until 4am, just use Date/Time instead of Date for the happens daily at.


#3

Thanks for your reply
#1 as state above " Please note I have another Piston that resets the Variable to False each day." I guess you missed that? I have a single pistons that resets a number of variables daily.
#2. Yes I did this so I could add dates on the Fly below each other but I see the inefficiency now. Thanks for the suggestion.
#3. Yes in most cases the day off includes the Friday and the Monday. I did this so I didn’t have to do two lines of separate dates. Most of the time I get Mondays and Fridays off together. Also I would use this if I had a week off, etc.

Going to close this think I will look at a different way of approaching it.


#4

LOL… You asked the question, I answered it. You may not like the answer but given the constraints of the system, it would work. Best of luck to you.