If I replace ‘{{ (states(‘input_number.mette_radiator_dag_temp’))|int }}’ with a string like ‘5’, everything works fine and number.radiator_mette_bedroom_eco_temperature will change to the value 5
Using Developer tools Templates, it seems like '{{ (states(‘input_number.mette_radiator_dag_temp’)) }} returns ‘5’
Also be careful with quotes. You need to use two kinds (double and single, like my example above) or you end up with opening and closing quotes like this:
value:'{{ (states('
Also I added a default value for the |int filter (this will be mandatory soon) and removed some extraneous brackets.
Thank you very much for your comments.
This solved my problem, I didn’t realize the quote issue about opening and closing, thanks for bringing this to my attention (it seems like I forgot to use my brain here).
The quote issue was actually everything I needed, the spacing was actually already correct.
Not in your post it want. Spacing is very important in yaml. If you want us to be able to help you, you need to preserve the spacing in your pasted code.
Also do not overlook this:
In the very near future your templates will not be loaded if you do not do this and the int filter fails to convert a state to a number.