Comfort Automation/ Security System Forums
Sunset/Sunrise Seting Flag - Printable Version

+- Comfort Automation/ Security System Forums (https://www.comfortforums.com)
+-- Forum: Support (https://www.comfortforums.com/forum-2.html)
+--- Forum: Questions on Programming Comfort (https://www.comfortforums.com/forum-83.html)
+--- Thread: Sunset/Sunrise Seting Flag (/thread-2049.html)



- EziAV - 11-20-2010

On a System Restart I wanted to query the Sunrise/Sunset Times to the current time and set a flag which would be used in other responses to determine if it is day or night.

How might this be accomplished? 




- ident - 11-20-2010

Comfort has a Night Time Flag that is automatically set at Sunset and cleared at Sunrise, so you do not need to manipulate flags

In the Response you can check the Night Time Flag eg

If NightTime <> 0 Then
    Do Response x
Else
    Do Response y
End If



- EziAV - 11-20-2010

Thanks, exactly what I was after.