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)