CaptainIffy - 2014-12-29

I tried using a fixed time duration to switch on lights just before sunset; but, while it works OK initially, it turns out that twilight changes duration throughout the year. A fixed duration offset results in poor timing for lights after just a few months. So I've switched to using custom (and positive) twilight angles - so that my lights are switched 'on' when the sun is just beginning to think about setting. That's why custom twilight angles were introduced into the code.

My second surprise was that rooms on the north side of my house (I live in the northern hemisphere) need to be turned on some time before those in south facing rooms. Obvious when you think about it! I use 7 degree twilight angle for the northern rooms and 5 for the south. Oddly, I switch my lights 'off' in the morning with a 3 degree sunrise angle.