Set cover at calculated value using template

hi everyone,
I am trying to do something that I believe should be easy but I am completely stuck

I am trying to make an automation to set the position of a cover to a certain value.
Now this value is calculated and stored in a number helper number.level_blind_studio as a float.

When I try to use it in an action, i.e. set_cover_position:

action: cover.set_cover_position
metadata: {}
data:
  position: {{ states("number.level_blind_studio")|int }}
target:
  entity_id: cover.oximo_50_io_room3

I get the error:
expected int for dictionary value @ data['position']. Got None

if I run the same extract in the developer tool template section, it works:

I guess I am doing something wrong using the template, can someone help me?

Single line templates must be enclosed in quotes. So

position: "{{ states('number.level_blind_studio')|int }}"

Or (multi line, no quotes):

position: >
  {{ states('number.level_blind_studio')|int }}

Have a read of: https://www.home-assistant.io/docs/configuration/templating/#important-template-rules