Templating changes in 2021.10.0

You are saying a user can find this? A new user going to template editor see the document linked there. There is no way for that user to know about a breaking change.
The template docs say:

We will not go over the basics of the syntax, as Jinja2 does a great job of this in their templates documentation.

Maybe the breaking changes should say the default values have been removed and a user needs to add them manually?

The defaults havenā€™t been removed yetā€¦ again it will produce an error, which means it wonā€™t resolve and you wonā€™t get an answer. Itā€™s like the default is removed. Thereā€™s no mention of that because it hasnā€™t happened yet. The breaking change tells you what to do, add a default. So add a default. Itā€™s zero for int and float. That was covered in the jinja docs, but again we are in the midst of the change.

Hereā€™s the current relative docs:

edit
forget thisā€¦
it might have been was a template dev tools error
my pardon

Timestamp_custom takes a timestamp, not a datetime object. Youā€™re using a datetime object in that error.

yes, thanks, I already edited the post, sorry again
probably should have added I donā€™t use the mentioned template at all, but

{{now().timestamp()|timestamp_custom('%X')}}

on the mentioned above, I see this now all of a sudden:

Template warning: 'round' got invalid input 'unavailable' when rendering template '{{value|round(2,none)}}' but no default was specified

so I guess I need to set it to

{{value|round(2,default=none)}}

after all. (itā€™s probably on an mqtt sensor not yet getting a value, thereā€™s no source listed unfortunately), and even though this would be what Petro said , supplying ā€˜none to methodā€™

Yes, didnā€™t we have this convo yesterday about round? None going to the 2nd argument defaults the method to ā€˜normal roudningā€™, it does not set the default argument.

I now see what you meant with thatā€¦ I took ā€˜normal roundingā€™ for the default argument when using none ā€¦ hence my question after that (bottom of this), which now is no longer standing.

it pays to read the arguments, I even covered it in the post about argumentsā€¦

A post was merged into an existing topic: Updating Templates with the new default values in 2021.10.x