Skip to content

Commit 40adb13

Browse files
committed
report errors in time_active
1 parent db1f0a3 commit 40adb13

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

custom_components/pyscript/trigger.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -614,6 +614,9 @@ def timer_active_check(cls, time_spec, now):
614614
this_match = start <= now <= end
615615
else: # Over midnight
616616
this_match = now >= start or now <= end
617+
else:
618+
_LOGGER.error("Invalid time_active expression: %s", active_str)
619+
return False
617620

618621
if negate:
619622
results["-"].append(not this_match)

0 commit comments

Comments
 (0)