Releases: Nerwyn/ha-nunjucks
Releases · Nerwyn/ha-nunjucks
1.3.0 - Parity With Backend Templates
Parity With Backend Templates
This release adds almost all of the template extensions described in the Home Assistant templating docs. This includes not only functions, but filters and tests as well.
It also implements a Pythonic datetime module! You'll have access to dates, times, datetimes and timedeltas for use in your templates.
See the README for more details on the available extensions, as some functions vary a little from their Home Assistant jinja2 backend template versions.
Fixes
- Add optional arguments
rounded
andwith_unit
tostates
. - Remove array comparison from
is_state_attr
. - Add nullish checks to some function inputs to prevent nullish values from being compared.
Full Changelog: 1.2.3...1.3.0
1.2.3
- Numerical template results no longer get cast to
number
to maintain possible leading and trailing zeroes of numerical strings.- Users may instead use the
int
orfloat
filters to convert numerical strings into numbers. - Fix return type of
renderTemplate
- Users may instead use the
- True/false check is no longer case sensitive.
Full Changelog: 1.2.0...1.2.3
1.2.1
- Numerical template results no longer get cast to
number
to maintain possible leading and trailing zeroes of numerical strings.- Users may instead use the
int
orfloat
filters to convert numerical strings into numbers.
- Users may instead use the
Full Changelog: 1.2.0...1.2.1
1.2.0 - Additional Context
- Developers can now provide additional context in the
renderTemplate
function to expose additional variables and functions to end users for use in templates.
Full Changelog: 1.1.0...1.2.0
1.1.0
- Created tests for all functions (except
match_media
, which can't really be tested in node). - Fixed bugs in all functions and
renderTemplate
based on tests. - Added npm publish pipeline.
Full Changelog: https://github.com/Nerwyn/ha-nunjucks/commits/1.1.0