Skip to content

Commit 8e84abe

Browse files
authored
Merge pull request #119 from dlashua/time_active_fix
report errors in time_active
2 parents db1f0a3 + 40adb13 commit 8e84abe

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)