Anyone have ideas how to provide more context for this error? It happens seemingly at random, but when it does it really blows up my log and then my HA instance (see over 10k log entries in under 2 mins).
I keep tweaking templates thinking I’ve fixed it and eventually it pops up again. But when it happens and I catch it soon enough, I can just reboot my instance and everything’s good again for a while.
Logger: homeassistant
Source: helpers/template.py:687
First occurred: 10:31:40 AM (10900 occurrences)
Last logged: 10:33:14 AM
Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/components/automation/init.py”, line 637, in async_trigger
and not self._cond_func(variables)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/components/automation/init.py”, line 1014, in if_action
if check(hass, variables) is False:
^^^^^^^^^^^^^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/helpers/condition.py”, line 179, in wrapper
result = condition(hass, variables)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/helpers/condition.py”, line 787, in template_if
return async_template(hass, value_template, variables)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/helpers/condition.py”, line 767, in async_template
info = value_template.async_render_to_info(variables, parse_result=False)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/helpers/template.py”, line 687, in async_render_to_info
assert self.hass and _render_info.get() is None
AssertionError
I’m having similar issues and it’s driving me nuts!!
Logger: homeassistant
Source: helpers/template.py:687
First occurred: 8:30:13 AM (49767 occurrences)
Last logged: 8:37:24 AM
Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/components/automation/init.py”, line 637, in async_trigger
and not self._cond_func(variables)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/components/automation/init.py”, line 1014, in if_action
if check(hass, variables) is False:
^^^^^^^^^^^^^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/helpers/condition.py”, line 179, in wrapper
result = condition(hass, variables)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/helpers/condition.py”, line 787, in template_if
return async_template(hass, value_template, variables)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/helpers/condition.py”, line 767, in async_template
info = value_template.async_render_to_info(variables, parse_result=False)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/helpers/template.py”, line 687, in async_render_to_info
assert self.hass and _render_info.get() is None
AssertionError
The AssertionError should normally not be reachable, which indicates you have an integration doing non-threadsafe operations on asyncio objects which is corrupting the internal asyncio state.
When an integration modifies the event loop internals from another thread the behavior is undefined and will usually eventually lead to a crash.