Piston Not Running All the Time


#1

Hi, all.

I’m relatively new to wC as I haven’t done anything meaningful with it, but I’ve had it installed for a while.

I’m trying to create a piston that will turn on all my lights 15 minutes before sunset. I want to turn off the lights at different times, depending on the day. For example:

Monday - Friday at Midnight: Turn off Coach Light - Front Door, String Lights
Saturday and Sunday at 2 AM: Turn off Coach Light - Front Door, String Lights
Everyday at 5 minutes after sunrise: Turn off Coach Light - Left, Coach Light - Right

I thought the code I’ve attached would do it, but it didn’t.

This is what I see in regards to when it last ran:

Last executed: 11/14/2019, 7:00:59 AM
Next scheduled: 11/15/2019, 7:02:00 AM

Here is my code:

Any help is greatly appreciated - thanks in advance!


#2

I think this will do what you want… adjust accordinly.


#3

Thanks for the quick feedback, @eibyer!

To accomplish the “every day at xxx” you use Triggers, correct? Seems like that is more efficient than IF statements.

I’ll give this a shot later today - thanks again!


#4

Hes still using If conduction’s but selecting Virtual device instead of physical device.


#5

One small tip if you are new to this command…

Every day at X PM
will only execute what is inside the block at the specific times

Alternatively, the code:
IF Time happens daily at X PM
will execute the entire piston, top to bottom, and run any commands not blocked by conditions.

They both have their place, but act very differently at time of execution.