From: Gregg L. <gr...@li...> - 2008-05-15 03:23:01
|
mo...@be... wrote: > While I'm working on that, a little clarification on what I want to > happen; in case someone knows of a much simpler method. First, do make sure that $Time_Sunrise and $Time_Sunset are correct for your specified lat and long ini parms. Second, although you won't get offsets, consider using the global var, $Dark: if ($Dark) { # turn light on } $Dark depends on $Time_Sunrise_Twilight and $Time_Sunset_Twilight. For me, you'll likely still want a light on around the edges of $Dark as it's a bit overly aggressive. But, at least $Dark simplifies things a bit if you are still having issues. BTW: I use a more complex method (not simpler) of determining "darkness" where I apply a dynamic offset derived as a function of the $Weather{Clouds} var since cloud cover significantly affects real light levels for me. Some might suggest just using a photocell; but, invariably, my photocells aren't quite that accurate and/or are influenced by artificial lighting. Gregg |