Contitional scenes: How to turn on lights, but only before surise

Hello.
I have the Vera Edge running UI7 and - among other things - some light switches.

Situation:
Some of the lights do turn on at 06:30 in the morning and turns of at sunrise. Works fine!

Question:
How do I program the scene to turn on the light at 06:30 but only if the sunrise has not occurred already.

In the scene that is scheduled to run at 6:30, go to the LUUP tab and add this

return luup.is_night() == true

This will prevent the scene from running between sunrise and sunset.

Thank’s a lot. That was an easy solution.

Is there a way to check if the time is before or after a specific time?

Pseudo-code:

Only turn on before 19:00

if time > 19:00
return = false

Only run between 19:00 and 20:00

if time > 18:59 $$ time < 20:00
return = true

Even thought the simplest solution has been provided, for future reference:
http://forum.micasaverde.com/index.php?topic=18679

As well as the tutorial that @Brientim pointed to, you should probably look at the Program Logic Event Generator(PLEG) plugin.

Here’s an excellent guide: PLEG Basics - An Introduction to the Program Logic Event Generator