While trying to solve an unrelated problem, I’ve come across several threads in the HA forums referring to a template filter function named multiply() which as its name suggests multiplies the previous number, e.g:
{{ value | multiply(5) }}
A convenient filter overall, but I cannot for the life of me find any documentation whatsoever anywhere on the Internet that even mentions such filter, except for a handfull of comments in the HA forums mentioning it in passing. It works so it’s obviously a real thing.
Is it an HA specific extension? Are there other filters available that aren’t listed in the documentation that I should know?
I’ve seen it but, like you said, can’t find documentation for it (not even in the latest Jinja2 docs).
Just a wild guess but maybe it was included a long time ago and then deprecated in favor of using the asterisk operator (*). So still available but no longer promoted as the way to multiply numbers.
Does anyone know if there’s an operator or template to apply an exponent? I’ve tried the caret (^) and the filters pow(n), power(n), exp(n), and exponent(n). There doesn’t seem to be anything in the documentation; I’m just hoping that something exists.