mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-19 15:26:59 +00:00
2022.6: Ad missing breaking change on template defaults
This commit is contained in:
parent
38773a825a
commit
2603c2f62b
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user