I’m getting these in my logs. There’s nothing I see in the logs to indicate where the error in the template is.
2025-12-08 08:42:48.811 ERROR (MainThread) [homeassistant.helpers.script.trigger_update_coordinator] Trigger Update Coordinator: Error executing script. Error rendering template for variables at pos 1: TypeError: '>' not supported between instances of 'str' and 'float'
I looked through all my traces manually and nothing matches the timestamp of the error. The error was a 8:42 this morning, and it’s now 10:54 locally. The timestamps in trace.saved_traces are in UTC.
➜ .storage date -u
Mon Dec 8 18:54:31 UTC 2025
➜ .storage date
Mon Dec 8 10:54:32 PST 2025
So, two hours ago (at 8am) it was 16:48 UTC
➜ .storage fgrep 'start":' trace.saved_traces | grep 12-08T16:4 | wc -l
0
And the last trace for 16:xx hour is 16:29:10 UTC
➜ .storage fgrep 'start":' trace.saved_traces | grep 12-08T16: | sort | tail -1
"start": "2025-12-08T16:29:10.705531+00:00",
Since no matching trace in there could it be a template in a Dashboard card instead of a script?
From the full log my guess is a variables: section in a template, but I haven’t found what script is running.
It doesn’t happen frequencly so leaving debug on isn’t great, or a sure bet debug level will give a hint where the issue is. I’m happy to add debugging code if I knew where.
Happens at odd times, too:
➜ .storage ha core logs -n 2000 | grep 'not supported between instances' | grep 2025 | cut -d ' ' -f 1,2
2025-12-07 11:31:26.758
2025-12-07 13:18:38.956
2025-12-07 13:54:11.020
2025-12-08 00:53:38.746
2025-12-08 02:31:07.344
2025-12-08 04:36:19.542
2025-12-08 08:42:48.811
Thanks.
Full log message
2025-12-08 08:42:48.811 ERROR (MainThread) [homeassistant.helpers.script.trigger_update_coordinator] Trigger Update Coordinator: Error executing script. Error rendering template for variables at pos 1: TypeError: '>' not supported between instances of 'str' and 'float'
2025-12-08 08:43:14.742 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved (None)
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/template/__init__.py", line 469, in async_render
render_result = render_with_context(self.template, compiled, **kwargs)
File "/usr/src/homeassistant/homeassistant/helpers/template/context.py", line 45, in render_with_context
return template.render(**kwargs)
~~~~~~~~~~~~~~~^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/jinja2/environment.py", line 1295, in render
self.environment.handle_exception()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.13/site-packages/jinja2/environment.py", line 942, in handle_exception
raise rewrite_traceback_stack(source=source)
File "<template>", line 1, in top-level template code
TypeError: '>' not supported between instances of 'str' and 'float'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/template/coordinator.py", line 140, in _handle_triggered_with_script
if script_result := await self._script.async_run(run_variables, script_context):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1833, in async_run
return await asyncio.shield(create_eager_task(run.async_run()))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 460, in async_run
await self._async_step(log_exceptions=False)
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 526, in _async_step
self._handle_exception(
~~~~~~~~~~~~~~~~~~~~~~^
ex, continue_on_error, self._log_exceptions or log_exceptions
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 556, in _handle_exception
raise exception
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 524, in _async_step
await getattr(self, handler)()
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 973, in _async_step_variables
self._action[CONF_VARIABLES].async_simple_render(self._variables)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/script_variables.py", line 81, in async_simple_render
rendered_variable = template.render_complex(value, run_variables)
File "/usr/src/homeassistant/homeassistant/helpers/template/__init__.py", line 218, in render_complex
return value.async_render(variables, limited=limited, parse_result=parse_result)
~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/template/__init__.py", line 471, in async_render
raise TemplateError(err) from err