diff --git a/homeassistant/helpers/template.py b/homeassistant/helpers/template.py index 83c347c7cb2..7909572bede 100644 --- a/homeassistant/helpers/template.py +++ b/homeassistant/helpers/template.py @@ -330,7 +330,7 @@ class Template: def ensure_valid(self) -> None: """Return if template is valid.""" - if self._compiled_code is not None: + if self.is_static or self._compiled_code is not None: return try: