'Render template with value exposed.
If valid JSON will expose value_json too.'

def render_with_possible_json_value(self, value, error_value=_SENTINEL):

    return run_callback_threadsafe(self.hass.loop, self.async_render_with_possible_json_value, value, error_value).result()
