thomasloven / lovelace-template-entity-row

🔹 Display whatever you want in an entities card row.
MIT License
210 stars 16 forks source link

Template errors fload my log file #114

Closed erkr closed 4 months ago

erkr commented 9 months ago

Since recent (guess core 2023.9.x), editing templates in the card floads my HA log file with hundreds of intermediate template errors (as the template code is invalid during editing). Log errors even continues to pop-up long (hours) after editing. I don't exclude the option this is caused by the parent card (collapsible card)

ildar170975 commented 8 months ago

Do not observe this. 2023.10.2 Win10x64+Chrome

изображение

type: entities
entities:
  - type: custom:template-entity-row
    entity: sun.sun
    state: '{{states(config.entity)}}'
  - type: custom:template-entity-row
    entity: sun.sun
    state: '{{sttes(config.entity) sdadd daddad}}'
erkr commented 8 months ago

@ildar170975 I was not clear I guess, the errors (talking about mb's in just a few minutes) are floading the HA logging, not the browser. That is why I also raised this ticket for the core backend.

The templates are calculated in the backend and it seems the card kicks off the template evaluations in a fast loop

ildar170975 commented 8 months ago

Thanks for explanations. Now I see errors in Log. But cannot say that the Log is flooded. Just a few errors within a few minutes - after when I added a card with a wrong template - till a moment I stopped testing it and deleted the card.

Probably it depends on a particular template. My template was simple, so may be it impacted the system less.

erkr commented 8 months ago

Thanks for checking your log! The errors are probably grouped, but when you open the full log, I guess you will see hundreds of logging with full stack traces

ildar170975 commented 8 months ago

I always check the full log only. The brief log is useless & confusing imho.

thomasloven commented 4 months ago

Unfortunately, this cannot be fixed due to how the GUI editor works. I've added a note about it at the bottom of the readme.

erkr commented 4 months ago

Hi Thomas Thanks for looking into it . At least I understand now the high rate of loggings. I will raise an issue for this in HA frontend, refer this issue and hope they pick it up Best Eric