2022.6: Ad missing breaking change on template defaults

This commit is contained in:
Franck Nijhof 2022-05-31 17:18:23 +02:00
parent 38773a825a
commit 2603c2f62b
No known key found for this signature in database
GPG Key ID: D62583BA8AB11CA3

View File

@ -428,6 +428,48 @@ mqtt:
{% enddetails %} {% enddetails %}
{% details "Template filter/function defaults" %}
The following template filters and functions will now error instead of returning
the input if the input is invalid and no default value is specified:
- `acos`
- `as_timestamp`
- `asin`
- `atan`
- `atan2`
- `cos`
- `float`
- `int`
- `log`
- `multiply`
- `round`
- `sin`
- `sqrt`
- `strptime`
- `tan`
- `timestamp_custom`
- `timestamp_local`
- `timestamp_utc`
Examples:
{% raw %}
- `{{ "abc" | float }}`: Will fail to render
- `{{ "abc" | float(default=5) }}`: Will render as -5, no warning will be logged
- `{{ float("abc") }}`: Will fail to render
- `{{ float("abc", default=5) }}`: Will render as -5, no warning will be logged
{% endraw %}
([@emontnemery] - [#71687]) ([documentation](/docs/configuration/templating/#numeric-functions-and-filters))
[@emontnemery]: https://github.com/emontnemery
[#71687]: https://github.com/home-assistant/core/pull/71687
{% enddetails %}
{% details "OAuth2 (re-)authentications" %} {% details "OAuth2 (re-)authentications" %}
Home Assistant will now use My Home Assistant to redirect the OAuth2 callback Home Assistant will now use My Home Assistant to redirect the OAuth2 callback