Need help find automation which crashes my HA

hello,
I have an memory issue with my HA installation, which I narrowed down to following log entries:

[31m2026-03-12 15:18:02.944 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved (task: None)
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/automation/__init__.py", line 929, in _async_trigger_if_enabled
    return await self.async_trigger(run_variables, context, skip_condition)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/automation/__init__.py", line 794, in async_trigger
    and not self._condition(variables)
            ~~~~~~~~~~~~~~~^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/condition.py", line 1348, in check_conditions
    if check(hass, variables) is False:
       ~~~~~^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/condition.py", line 577, in wrapper
    result = condition(hass, variables)
  File "/usr/src/homeassistant/homeassistant/helpers/condition.py", line 1122, in template_if
    return async_template(hass, value_template, variables)
  File "/usr/src/homeassistant/homeassistant/helpers/condition.py", line 1104, in async_template
    info = value_template.async_render_to_info(variables, parse_result=False)
  File "/usr/src/homeassistant/homeassistant/helpers/template/__init__.py", line 566, in async_render_to_info
    raise RuntimeError(
    ...<3 lines>...
    )
RuntimeError: RenderInfo already set while rendering Template<template=({{ "homeassistant.components.automation." in trigger.event.data.name and this.context.parent_id == None }}) renders=318378>, this usually indicates the template is being rendered in the wrong threade[0m
e[31m2026-03-12 15:18:02.945 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved (task: None)
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/automation/__init__.py", line 929, in _async_trigger_if_enabled
    return await self.async_trigger(run_variables, context, skip_condition)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/automation/__init__.py", line 794, in async_trigger
    and not self._condition(variables)
            ~~~~~~~~~~~~~~~^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/condition.py", line 1348, in check_conditions
    if check(hass, variables) is False:
       ~~~~~^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/condition.py", line 577, in wrapper
    result = condition(hass, variables)
  File "/usr/src/homeassistant/homeassistant/helpers/condition.py", line 1122, in template_if
    return async_template(hass, value_template, variables)
  File "/usr/src/homeassistant/homeassistant/helpers/condition.py", line 1104, in async_template
    info = value_template.async_render_to_info(variables, parse_result=False)
  File "/usr/src/homeassistant/homeassistant/helpers/template/__init__.py", line 566, in async_render_to_info
    raise RuntimeError(
    ...<3 lines>...
    )
RuntimeError: RenderInfo already set while rendering Template<template=({{ "action" in trigger.event.data.message[0] }}) renders=319181>, this usually indicates the template is being rendered in the wrong threade[0m
[31m2026-03-12 15:18:02.946 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved (task: None)

This error is spammed every 1ms until I’m out of memory and HA is automatically restarted:

Unfortunatelly it is not directly reproducable to help exclude specific parts.
I already disabled 90% of the integrations.
But I read the errors as it is a problem on an automation?!

Can anyone help me point out which automation/task is the problem? Or how to find it?

Edit: I “only” have approx 30 automations. I can open every one, but I don’t know what I’m looking for.

Try searching for any of these strings:

trigger.event.data.name
this.context.parent_id
trigger.event.data.message[0]

If you use Automation Blueprints, check those as well.

1 Like

Wow. Renders should never be that high.

It’s a template condition and it’s in the main condition block, not an action block. I.e. you can search for condition: template on top of what @123 already mentioned.

Also, it looks like it’s an automation that’s meant to read information from your log file. Which explains why it’s running out of memory, because it’s creating events for itself to read and it spirals. Kind of like a oroboros

1 Like

thank you very much :slight_smile:

I found 3 automations. I think the “system_log_event” automations are the ones to blame…

  • Notify for ‘action’ errors:
alias: System - Fehler im Log
description: Create notifications for 'action' errors
triggers:
  - trigger: event
    event_type: system_log_event
conditions:
  - condition: template
    value_template: "{{ \"action\" in trigger.event.data.message[0] }}"
actions:
  - action: persistent_notification.create
  • Notify on automation errors:
alias: System - Automation fehlgeschlagen
description: Fehler in Automationen
triggers:
  - trigger: event
    event_type: system_log_event
    event_data:
      level: ERROR
conditions:
  - condition: template
    value_template: >-
      {{ "homeassistant.components.automation." in trigger.event.data.name and
      this.context.parent_id == None }}
actions:
  - action: notify.persistent_notification
    data:
      message: |
        {% for i in trigger.event.data.message %} - {{ i }} {% endfor %}
      title: >
        {% set automation = trigger.event.data.name |
        regex_findall(find='homeassistant\.components\.automation\.(.*)') %} {%
        if automation | length == 1 %} Automation "{{ automation | first |
        replace('_', ' ') | title }}" fehlgeschlagen {% endif %}

The problably innocent 3rd automation: NFC reader on front door from Ubiquiti G4 Doorbell Pro NFC x Smart Lock YAML Problem - #4 by mekaneck