@callback
def async_render(self, variables: TemplateVarsType=None, parse_result: bool=True, limited: bool=False, strict: bool=False, **kwargs: Any) -> Any:
    'Render given template.\n\n        This method must be run in the event loop.\n\n        If limited is True, the template is not allowed to access any function or filter depending on hass or the state machine.\n        '
    if self.is_static:
        if ((not parse_result) or self.hass.config.legacy_templates):
            return self.template
        return self._parse_result(self.template)
    compiled = (self._compiled or self._ensure_compiled(limited, strict))
    if (variables is not None):
        kwargs.update(variables)
    try:
        render_result = _render_with_context(self.template, compiled, **kwargs)
    except Exception as err:
        raise TemplateError(err) from err
    render_result = render_result.strip()
    if (self.hass.config.legacy_templates or (not parse_result)):
        return render_result
    return self._parse_result(render_result)
Render given template.

This method must be run in the event loop.

If limited is True, the template is not allowed to access any function or filter depending on hass or the state machine.
@callback
def async_render(self, variables: TemplateVarsType=None, parse_result: bool=True, limited: bool=False, strict: bool=False, **kwargs: Any) -> Any:
    'Render given template.\n\n        This method must be run in the event loop.\n\n        If limited is True, the template is not allowed to access any function or filter depending on hass or the state machine.\n        '
    if self.is_static:
        if ((not parse_result) or self.hass.config.legacy_templates):
            return self.template
        return self._parse_result(self.template)
    compiled = (self._compiled or self._ensure_compiled(limited, strict))
    if (variables is not None):
        kwargs.update(variables)
    try:
        render_result = _render_with_context(self.template, compiled, **kwargs)
    except Exception as err:
        raise TemplateError(err) from err
    render_result = render_result.strip()
    if (self.hass.config.legacy_templates or (not parse_result)):
        return render_result
    return self._parse_result(render_result)