Template config validator should not allow dictionaries

This commit is contained in:
Paulus Schoutsen 2016-08-09 20:58:27 -07:00
parent 6dc49ff123
commit e773526714

View file

@ -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: