How to control a cover in appdaemon?

Hi all,

I have a RobbShop sunscreen cover module (This one: Zigbee rolluikschakelaar kopen? | We ❤️ Smart! | ROBBshop).
I want to automate it via AppDaemon but I cannot find a way to open or close it in AppDaemon.

Some examples I tried:

    self.turn_on(self.args["sunscreen"])
    self.turn_off(self.args["sunscreen"])
    self.set_state(self.args["sunscreen"], position='4')
    self.set_state(self.args["sunscreen"], current_position='4')
    self.set_state(self.args["sunscreen"], state='open')

self.args["sunscreen"] is cover.sunscreen

Does anyone have a working cover.XXX via AppDaemon? If yes → Please send an example.

This is my first topic. I hope my question is clear. If not → Ask me please.

I don’t know anything about this specific device, but you might want to try calling a service related to the device. My guess is:

self.call_service("cover/close_cover", entity_id="cover.sunscreen")
self.call_service("cover/open_cover", entity_id="cover.sunscreen")

Here’s a list of the available services for cover: Cover - Home Assistant

Here is what I do on my side for my 2 covers:
self.shutter_tv = self.get_entity('cover.shutter_tv_cover')
self.shutter_stairs = self.get_entity('cover.shutter_stairs_cover')

self.run_at_sunset(self.run_daily_sunset_callback, offset=1800)
self.run_at_sunrise(self.run_daily_sunrise_callback, offset=-1800)

#--------------------------------------------------------------
  def run_daily_sunset_callback(self, kwargs):
    self.shutter_tv.call_service("close_cover")
    self.shutter_stairs.call_service("close_cover")
    self.log("sunset:close shutters")
    self.set_textvalue('input_text.info_shutter_timing', "will open at "+str(self.morning_time))

  def run_daily_sunrise_callback(self, kwargs):
    self.shutter_tv.call_service("open_cover")
    self.shutter_stairs.call_service("open_cover")
    self.log("sunrise:open shutters")
    self.set_textvalue('input_text.info_shutter_timing', "will close at "+str(self.evening_time))

additionnal functions that I use in other automations to read of write a specific position:

self.shutter_tv.get_state(attribute="current_position")==0:
self.shutter_tv.call_service("set_cover_position", position="40")