Render a Jinja2 template
services_render_templateRender a Jinja2 template string through Home Assistant's template engine to preview its output before saving it into an automation, script, or template sensor.
Instructions
Render a Jinja2 template string once through HA's template engine over HTTP.
Posts to /api/template with {"template": template} and returns the
rendered text.
Use when: testing a template's output before saving it into an
automation, script or template sensor.
Not for: rendering through the WebSocket subscription transport — use
ws_render_template.
Returns: the rendered template as plain text.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| template | Yes | Jinja2 template string to render, e.g. '{{ states("sensor.temp") }}'. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |