Between sunset and sunrise?

hi there any ideas why this piston is triggering the events when before the sunset time??

1/27/2018, 3:13:43 PM +823ms
+1ms ╔Received event [test].presence = present with a delay of 45ms
+80ms ║Runtime (37501 bytes) successfully initialized in 30ms (v0.2.102.20180116) (77ms)
+81ms ║╔Execution stage started
+144ms ║║Executed [Backdoor left].on (25ms)
+171ms ║║Executed [Backdoor right].on (24ms)
+233ms ║║Executed [Driveway Lights].on (61ms)
+236ms ║║Executed virtual command [Backdoor left, Backdoor right, Driveway Lights].wait (0ms)
+237ms ║║Requesting a wake up for Sat, Jan 27 2018 @ 3:23:44 PM GMT (in 600.0s)
+241ms ║╚Execution stage complete. (161ms)
+243ms ║Setting up scheduled job for Sat, Jan 27 2018 @ 3:23:44 PM GMT (in 599.996s)
+249ms ╚Event processed successfully (249ms)

Shouldn’t that be:
Time is between sunset and sunrise?

1 Like

The System variable ‘$Sunset’ is always between sunset and sunrise, so if the other condition is met, the piston will fire. I think you want the statement to be:
Time is between sunset and sunrise

1 Like

ok when i select the time variable it won’t show me a between comparison only is, is not?

Try this:
IF [Virtual Device} Time is between [Preset] Sunset and [Preset] Sunrise

1 Like

Don’t choose ‘Variable’ from the drop down list. Chose ‘Virtual Device’ (second one from top) and then ‘Time’ at the bottom of that drop down. You’ll then be able to select the Presets for Sunset and Sunrise and then do the ‘is between’ choice you want.

2 Likes

thanks found it :slight_smile:

1 Like