bacco007 / HomeAssistantConfig

My Home Assistant Configuration
The Unlicense
146 stars 13 forks source link

RuntimeError: RenderInfo already set while rendering #92

Open johntdyer opened 2 months ago

johntdyer commented 2 months ago

Describe the bug

After upgrading to 2024.07.3 I noticed this error in the logs

RuntimeError: RenderInfo already set while rendering Template<template=({{ not 'logs_error_counter_increment' in (trigger.event.data.message|string) }}) renders=16574>, this usually indicates the template is being rendered in the wrong thread

It seems to be coming from this template ...

---
- id: system_logging_increment_counter
  alias: "System - Logging - Increment Counter"

  trigger:
    - platform: event
      event_type: system_log_event
      event_data:
        level: ERROR
      id: error
    - platform: event
      event_type: system_log_event
      event_data:
        level: WARNING
      id: warning
    - platform: event
      event_type: system_log_event
      event_data:
        level: CRITICAL
      id: critical
  action:
    - choose:
        - conditions:
            - condition: trigger
              id: warning
          sequence:
            - service: counter.increment
              entity_id: counter.logs_warning_counter
        - conditions:
            - condition: trigger
              id: error
            - condition: and
              conditions:
                - condition: template
                  value_template: "{{ not 'logs_error_counter_increment' in (trigger.event.data.message|string) }}"
          sequence:
            - service: counter.increment
              entity_id: counter.logs_error_counter
        - conditions:
            - condition: trigger
              id: critical
          sequence:
            - service: counter.increment
              entity_id: counter.logs_critical_counter
  mode: queued
  max: 20
  max_exceeded: silent

which I am actually a big fan of, and really would like be able to continue using. I am reaching out hoping you may have some insight into the nature error and how serious it is or if it can be ignored w/ logger filters ?

thanks again for all your awesome work up here, it really has been a great source of inspiration for my Hass install

github-actions[bot] commented 2 days ago

Stale issue message