From 40adb130c902f041d895d3df9bc01cf1940cd5cd Mon Sep 17 00:00:00 2001 From: Daniel Lashua Date: Mon, 14 Dec 2020 06:33:52 -0600 Subject: [PATCH] report errors in time_active --- custom_components/pyscript/trigger.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/custom_components/pyscript/trigger.py b/custom_components/pyscript/trigger.py index cffd9ff..8e8b694 100644 --- a/custom_components/pyscript/trigger.py +++ b/custom_components/pyscript/trigger.py @@ -614,6 +614,9 @@ def timer_active_check(cls, time_spec, now): this_match = start <= now <= end else: # Over midnight this_match = now >= start or now <= end + else: + _LOGGER.error("Invalid time_active expression: %s", active_str) + return False if negate: results["-"].append(not this_match)