Calculations with sensor values

@will-r
What you use here is the old format. The format is recently changed.
See Template - Home Assistant

The old format is still valid. I use it extensively.