Derivative of templated number

I have trouble getting a derivative from a templated number: it doesn’t show up as a selectable option.

This is the number:

{{
  states('sensor.weatherstation_indoor_humidity') | int - 
  states('sensor.vindstyrka_bedroom_humidity') | int
}}

And this is the selector - happens if the unit of the template number is “%”, or if it is left blank

What am I doing wrong?

You are using a template number when instead you should be using a template sensor.

A number is used when you want to control the value. A sensor just displays a value without any ability to control it.

Great, thanks.