Piston Stops At Midnight


#1

1) Give a description of the problem
Piston loop runs until midnight and then stops loop despite “until” being set for sunrise

2) What is the expected behaviour?
Should run until sunrise

3) What is happening/not happening?
loop stops at midnight without any obvious reason to break loop

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


#2

At midnight, sunrise goes from being a past event to being a future event. Honestly, I don’t understand why it even loops at all but I guess since sunrise is in the past it continues looping. Once it becomes the future, it is probably waiting for it to occur. I think you would do better with a while loop rather than repeat and you can use ‘NOT between sunrise and sunset’ to unambiguously cover the night.


#3

Agreed ! I originally did not use the NOT option and was having difficulties with timed runs like “IF time is between 21:00 to 05:30” that span midnight. Then @WCmore enlightened me to the NOT option when times span midnight. Example “IF time is NOT between 05:30 and 21:00”. It takes a little thought to understand the logic. But it works beautifully.


#4

Thanks I will give this a try and see what happens.