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:

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


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


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