Allow skip parsing template result (#42401)
This commit is contained in:
1 parent
80e8068b46
commit
45aba9bdf2
10 files changed
+98
-24
No files matched your search
@@ -410,7 +410,7 @@ class APITemplateView(HomeAssistantView):
|
||||
try:
|
||||
data = await request.json()
|
||||
tpl = template.Template(data["template"], request.app["hass"])
|
||||
return str(tpl.async_render(data.get("variables")))
|
||||
return tpl.async_render(variables=data.get("variables"), parse_result=False)
|
||||
except (ValueError, TemplateError) as ex:
|
||||
return self.json_message(
|
||||
f"Error rendering template: {ex}", HTTP_BAD_REQUEST
|
||||
|
||||
Reference in new issue
Block a user