From e773526714d7abd5b9990fcbca553e42860857fc Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Tue, 9 Aug 2016 20:58:27 -0700 Subject: [PATCH] Template config validator should not allow dictionaries --- homeassistant/helpers/config_validation.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/homeassistant/helpers/config_validation.py b/homeassistant/helpers/config_validation.py index 2c4ed6795e9..032d46abf0f 100644 --- a/homeassistant/helpers/config_validation.py +++ b/homeassistant/helpers/config_validation.py @@ -239,6 +239,8 @@ def template(value): """Validate a jinja2 template.""" if value is None: raise vol.Invalid('template value is None') + if isinstance(value, (list, dict)): + raise vol.Invalid('template value should be a string') value = str(value) try: