Open blind cover to helper level

I have a blind cover that is opened with an automation like this:


device_id: 27b76a4684a7f05d8a37c04979beb031
domain: cover
entity_id: a6fe659f87a645b63194a6b4feb6f5be
type: set_position
position: 9

Now I want to set the position with a numeric helper already created but somehow the automation does not work if I try this:

device_id: 27b76a4684a7f05d8a37c04979beb031
domain: cover
entity_id: a6fe659f87a645b63194a6b4feb6f5be
type: set_position
position: {{ states('input_number.tapparella_soggiorno_chiusura')|float }}

What am I missing?

{{ states('input_number.tapparella_soggiorno_chiusura')|float }} is exactly equal to 9 at the moment

solved in this way:

service: cover.set_cover_position
data:
  position: "{{ states('input_number.tapparella_soggiorno_chiusura') | int(0) }}"
target:
  entity_id: cover.tapparella_soggiorno