Condition in script

Ho to all, i need help in my script.
I have a script to close all roller shutter, but i want automate the position of one roller shutter.
I don’t want all the script, i need a help in the command set cover position.
I want to set the position of this roller shutter based on internal and external temperature, but i don’t know how set my mind on cover set position command.
I think to make a variable with the calc of internal and external temperature, but i don’t know the correct language.
This is my initial wrong situation

device_id: 50c921b6d82ca8d1fd5e2ff72xxxxxxx
domain: cover
entity_id: cover.shellyswitch25_d8f15b1xxxx
type: set_position
position: input_number.prova]

No any idea?

It would help if you give a more specific explanation of what you are trying to do and what variables are in play. For example, what is the calculation you are trying to use? How does it relate to the position of the cover?

As a basic action, you can use the following to set a cover’s position based on the value of an input number helper:

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