From 63e16de6c0f305f6bb7ec1b81c31e0e68163af3e Mon Sep 17 00:00:00 2001 From: Erik Montnemery Date: Tue, 1 Jun 2021 17:07:45 +0200 Subject: [PATCH] Improve time condition trace (#51335) --- homeassistant/helpers/condition.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/homeassistant/helpers/condition.py b/homeassistant/helpers/condition.py index a59ad459874..23816b94a65 100644 --- a/homeassistant/helpers/condition.py +++ b/homeassistant/helpers/condition.py @@ -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