Beginner question concerning call_service with a variable

Hello,

I have an app for controilling a blinde. Last extension of the working app: The position for the night shall be selectable via HA. I get all data from HA into AppDeamon, but I have no clue how to replace the “80” by a parameter

self.my_blind.call_service("set_cover_position", position="80") 

Here are my small demo app with all tries I did:

import appdaemon.plugins.hass.hassapi as hass

class HelloWorld(hass.Hass):

  def initialize(self):
    
    self.my_blind = self.get_entity("cover.sz_rolladen")
    self.blind_night_pos = self.get_entity("input_number.sz_blind_pos_night")
    ##
    self.myPos = self.blind_night_pos.get_state()
    data = {"position": self.myPos}
    strdata = '"'+str(self.myPos)+'"'
    # #   
    self.log("-----> {} -- {}".format(self.myPos,strdata))
    # the following line works as expected
    self.my_blind.call_service("set_cover_position", position="80") 

    ## sevelat tries to have a parameter instead a fix position
    #self.my_blind.call_service("set_cover_position", position=self.myPos)
    #self.my_blind.call_service("set_cover_position", position=strdata)
    #self.my_blind.call_service("cover/set_cover_position", data=data)
    #self.my_blind.call_service("set_cover_position", {"position":self.blind_night_pos.get_state()})
    #self.my_blind.call_service('cover/set_cover_position', {"position":self.myPos})    
    #self.call_service("cover","set_cover_position",{entity_id="cover.sz_rolladen",position=self.myPos})
    #self.call_service('cover/set_cover_position',{entity_id="cover.sz_rolladen",position=self.myPos})

Thank you

I always thought “self.my_blind.call_service(“set_cover_position”, position=“80”)”
because of the “80” that a string was expected. But this is not the case.
The following lines are working for me.

self.myPos = round(float(self.blind_night_pos.get_state()))
self.my_blind.call_service("set_cover_position", position=self.myPos)