mirror of
https://github.com/home-assistant/core.git
synced 2025-08-04 21:25:13 +02:00
Template config validator should not allow dictionaries
This commit is contained in:
@@ -239,6 +239,8 @@ def template(value):
|
|||||||
"""Validate a jinja2 template."""
|
"""Validate a jinja2 template."""
|
||||||
if value is None:
|
if value is None:
|
||||||
raise vol.Invalid('template 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)
|
value = str(value)
|
||||||
try:
|
try:
|
||||||
|
Reference in New Issue
Block a user