Holiday Lights timing


#1

1) Give a description of the problem
I THINK I got it right. I want them on twice a day: On at 5am and off at 20 minutes after sunrise, and then on at 20 minutes before sunset and off at 11pm.

2) What is the expected behaviour?
LOL That it works! :slight_smile:

3) What is happening/not happening?
With me? There’s no TELLING what I may or may not have forgotten!

4) Post a Green Snapshot of the pistonimage


#2

Looks like it should work. When I did this I just used a start time and end time with separate ‘if’ statements. Let us know if you have any problems.

One note: This works because it is the only if in your piston so webcore turns it into a trigger. In any more complicated piston, you would need a trigger (‘time happens daily at’). This will do what you want for this case.


#3

Looks good to me. This is a classic case where using only conditions arguably makes for a better solution than triggers.

It works well because the absence of any explicit triggers results in the piston scheduling the piston to run at the start and end times which is exachly what you want. It will also do the most obviously sensible thing in response to the Test button, execution from other pistons, being called by external URL, and best of all if a schedule event gets missed and a recovery event comes along.


#4

Thanks all!