I am a real disaster at templating.
I need to determine the difference between two sensor values for one of my automations:
I tried with the following but it doesn’t work :
{{states('sensor.sensor1') - states('sensor.sensor2')}}
I get the following error in the Developer Tools
TypeError: unsupported operand type(s) for -: 'str' and 'str'
Any help would be appreciated.
Do you know of a good tutorial for newbie to learn templalting?