diff --git a/homeassistant/helpers/template.py b/homeassistant/helpers/template.py index 79f372e3ff1..bef6323d10c 100644 --- a/homeassistant/helpers/template.py +++ b/homeassistant/helpers/template.py @@ -908,7 +908,7 @@ def strptime(string, fmt): """Parse a time string to datetime.""" try: return datetime.strptime(string, fmt) - except (ValueError, AttributeError): + except (ValueError, AttributeError, TypeError): return string