Posts: 1,255
Threads: 219
Joined: May 2007
Reputation:
0
There are 2 events in the \"Miscellaneous Events\" section that can fire responses.
At the time the Sunrise event fires can you confirm the value in the NightTime flag; I would have thought it should be 0 (zero) as it\'s now daytime but when I checked I\'m sure it\'s still 1 (ie NightTime); surely this if confirmed isn\'t correct?
J
Posts: 6,024
Threads: 880
Joined: Apr 2006
Reputation:
3
The Sunrise Event should make NightTime flag=0 and Sunset should set NightTime Flag=1
Didnt you make use of NightTime successfully to announce temperature when not at night previously?
Posts: 6,024
Threads: 880
Joined: Apr 2006
Reputation:
3
The reason why the night time flag is not in the correct state is because the Sunrise or Sunset Response happens before the Night Time flag is changed
The correct way to do this is
Sunrise Response
Set NightCtr=0
Sunset Response
Set NightCtr=1
I wonder why you need to use a counter in this case. I think you should be able to use the NightTime Flag instead of the Counter for any purpose, in which case the Sunrise and Sunset Responses are not necessary at all
Posts: 1,255
Threads: 219
Joined: May 2007
Reputation:
0
OK, thanks for confirming.
Yes I do use Nighttime flag in my responses, and as you say it can be used anywhere, but I\'d suggest this is a bug that the nighttime flag is incorrect if used in sunrise/sunset responses as you would assume that at either of these events the flag should reflect the actual state. At Sunrise response event it should be readable as 0 and at sunset it should be 1 surely.
I only came across this as I was firing a response that had these in an IF statement that included nighttime tests and whilst I agree the test should be implicit at the time these reponses fire (ie by virtue of it being sunrise or sunset respectively) I was trying not to have too many variants of a common response to maintain.
J