How to subtract value from sensor

i need to subtract a value from two sensor and so far it has not been working for me, all errors

  • platform: template
    value_template: “{{ states(‘sensor.w1000_180’) | int - 49687 }}”
{{ (((((states('proximity.home')|float-2100)**2
        )**0.5)/6.5)+15)|round(0)*1000 }}

There’s a bit of subtraction, squaring, square rooting etc.

1 Like

Did you manage to resolve this?