Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jinja2 templates will spam network requests. #47

Open
bratanon opened this issue Dec 15, 2021 · 1 comment
Open

Jinja2 templates will spam network requests. #47

bratanon opened this issue Dec 15, 2021 · 1 comment

Comments

@bratanon
Copy link

When using the jinja2 template, this card will request the template endpoint multiple times every second.

  - entity: light.entrance_outdoor    
    type: "custom:secondaryinfo-entity-row"
    secondary_info: "{{ 1 + 1 }}"

image

Guess this is because _updateElement will trigger as soon as something changes in the hass object, which for a larger setup could be many hundred times per second.

@igorsantos07
Copy link

igorsantos07 commented Jun 18, 2024

Yep, I noticed the same while looking around for a way to use {entity} inside the Jinja templates. Gave up on opening a new issue, as we'd better get back to the weird [[ ]] syntax, given this seems unavoidable for being present since 2021.

Edit: or maybe not, bdraco seems to have made a suggestion that could fix this issue at #53.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants