Hi Scott,
Well I actually get both modes twice. My config:
("Evening", {"hour": 20, "minute": 0, "second": 0, "channel": "astro:sun:local:daylight#event", "event": "END", }),
("Night_Evening", {"hour": 21, "minute": 0, "second": 0, "channel": "astro:sun:local:civilDusk#event", "event": "END"})
So for 29 June 2020:
- Evening is 20:00:00 OR Daylight end (21:18 hrs)
- Night_Evening is 21:00:00 OR Civil Dusk end (22:10 hrs)
Evening is triggered at 20:00 hrs (as expected)
Night_Evening is triggered at 21:00 hrs (as expected)
Evening is re-triggered at 21:18
Night_Evening is re-triggered at 22:10
I’m still migrating from a simple IsDay/IsNight setup, so I’ll probably tweak stuff.
Does it matter that not all my config items use both fixed time and dynamic channels? For example ‘Afternoon’ starts at 12:00:00, so I’ve not put in a channel equivalent.
mode_dict = OrderedDict([
("Night_Morning", {"hour": 0, "minute": 2, "second": 0}),
("Morning", {"hour": 6, "minute": 0, "second": 0, "channel": "astro:sun:local:daylight#event", "event": "START"}),
("Afternoon", {"hour": 12, "minute": 0, "second": 0}),
("Evening", {"hour": 20, "minute": 0, "second": 0, "channel": "astro:sun:local:daylight#event", "event": "END", }),
("Night_Evening", {"hour": 21, "minute": 0, "second": 0, "channel": "astro:sun:local:civilDusk#event", "event": "END"})
])