Turn on at sunrise or sunset not working

I definitely agree that this “known issue” has been unresolved for too long, particularly since it affects a very common and expected use case (i.e., turning on/off lights at sunset/sunrise!).

I fear that the issue is that even 5 minutes may not resolve the problem (and I think – just guessing) that this is tied into the long execution times of “unschedule()”:

The behavior of runIn() and all (?) related scheduling is defined with rules that seem too tight for the abilities of the execution environment. Jobs are not allowed to execute if their scheduled time has past. Maybe this is resolved with a queuing mechanism that takes a “tolerance” argument (i.e., a sunset job can live in the queue as long as 30 minutes, rather than being dropped altogether).

1 Like