You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Templating in Home Assistant is powered by the Jinja2 templating engine.
The problem is, that the links target the latest Jinja docs, which currently describe Jinja v3 (not v2), for example:
While the float and int filters do allow a default fallback value if the conversion is unsuccessful, they do not provide the ability to catch undefined variables.
The link to v3 docs, while erroneously labeled as for v2, is also provided by the Developer Tools -> Template panel of HA:
Possible solutions
a.) Easier: change links to the latest 2.x branch of docs: https://jinja.palletsprojects.com/en/latest/templates/#float -> https://jinja.palletsprojects.com/en/2.11.x/templates/
b.) Harder: upgrade HA's Jinja engine to be based upon v3
Feedback
The problem
According to the docs, the templating engine is based upon Jinja 2:
The problem is, that the links target the latest Jinja docs, which currently describe Jinja v3 (not v2), for example:
The link to v3 docs, while erroneously labeled as for v2, is also provided by
the Developer Tools -> Template
panel of HA:Possible solutions
a.) Easier: change links to the latest 2.x branch of docs:
https://jinja.palletsprojects.com/en/latest/templates/#float -> https://jinja.palletsprojects.com/en/2.11.x/templates/
b.) Harder: upgrade HA's Jinja engine to be based upon v3
I can help with option
a.)
.URL
https://www.home-assistant.io/docs/configuration/templating
Version
2024.1.6
Additional information
No response
The text was updated successfully, but these errors were encountered: