Skip to content

Releases: Nerwyn/ha-nunjucks

1.3.0 - Parity With Backend Templates

09 Oct 00:52
Compare
Choose a tag to compare

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 and with_unit to states.
  • 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

15 May 04:00
Compare
Choose a tag to compare
  • 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 or float filters to convert numerical strings into numbers.
    • Fix return type of renderTemplate
  • True/false check is no longer case sensitive.

Full Changelog: 1.2.0...1.2.3

1.2.1

15 May 03:40
Compare
Choose a tag to compare
  • 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 or float filters to convert numerical strings into numbers.

Full Changelog: 1.2.0...1.2.1

1.2.0 - Additional Context

08 Dec 01:51
Compare
Choose a tag to compare
  • 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

06 Dec 06:20
Compare
Choose a tag to compare
  • 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