Improve time condition trace (#51335)
parent
fb281c6bde
commit
63e16de6c0
|
@ -756,15 +756,18 @@ def time(
|
|||
)
|
||||
|
||||
if after < before:
|
||||
condition_trace_update_result(after=after, now_time=now_time, before=before)
|
||||
if not after <= now_time < before:
|
||||
return False
|
||||
else:
|
||||
condition_trace_update_result(after=after, now_time=now_time, before=before)
|
||||
if before <= now_time < after:
|
||||
return False
|
||||
|
||||
if weekday is not None:
|
||||
now_weekday = WEEKDAYS[now.weekday()]
|
||||
|
||||
condition_trace_update_result(weekday=weekday, now_weekday=now_weekday)
|
||||
if (
|
||||
isinstance(weekday, str)
|
||||
and weekday != now_weekday
|
||||
|
|
Loading…
Reference in New Issue