Sunset or time. Whichever is later piston


#1

1) Give a description of the problem
Need a piston to activate at sunset or a specific time, whichever is later.

2) What is the expected behavior?
Activate at sunset or time, whichever is later. In other words if I want it to activate at say at 5 pm and sunset is 4:45 pm then activate at 5 pm. Conversely if sunset is 5:30 pm then activate at 5:30 pm. And also with a before offset to sunset to make things more interesting.

3) What is happening/not happening?
Nothing yet as I have been unable to figure it out. :blush:
Thanx in advance.


#2

On top of my head I’d try grouping condition. There’s probably leanier way to achieve this tho.

If

        -time is x
And |
        - sunset < time 
Or
         - time is sunset 
And  | 
         - time < x

Proposed statements are poorly written but I focused on the logic. Haven’t tried it tho.


#3

I think you are on the right track. Messed with the before and after logic a bit and think I have it working. Will post a sample once I have further tested and experimented.
Thank you very much, Abe