Somfy_mylink - Opening shades partially or to favorite position

I have Somfy solar shades and somfy-mylink that I want to open to a partial position based on the sun’s elevation. I have successfully created automation(s) to open or close the shades completely based on the suns elevation using the cover services created by implementing the somfy-mylink integration in Home assistant. Unfortunately, it does not appear a partial or favorite position covers service is readily available. So my idea was to time the shades speed to a set point and use the timer integration in an automation to stop the shade using cover.stop_cover. After reading the Home Assistant help files and looking for examples on the web I still don’t have a clue on how to start and stop automation. Currently, I am opening the shades completely based on sun elevation as follows:

  • alias: ‘Raise shades when sun drops 4.0 degrees’
    trigger:
    platform: numeric_state
    entity_id: sun.sun
    value_template: ‘{{ state.attributes.elevation }}’
    below: 4.0
    action:
    • service: cover.open_cover
      entity_id: group.all_covers

How might I add a 10-second on-off timer to this? I do have a timer configured as:

timer:
``shades:
````duration: ‘00:00:10’

Thanks for any help.

PS - Sorry about code formating. Cna’t figure out how to fix this completly

Hi there,

I’m also looking to partially open shades, I wonder if you have any updates?

I think time limits could work, but it would be best to be able to send the position to the motor, and get the status report back from the motor. I believe motors are capable of this, as this is available with the Connexoon hub.

Any updates would be appreciated.

Regards.

I started looking into this over the weekend. Here’s a script I ended up writing. However, it’s still iffy because I don’t know exactly where the cover is at the time. I’m planning to use some open/close sensors to get the current location of the screen.

  alias: Outside Rollershade Loft Half Down
  sequence:
    - alias: Toggle Loft Rollershade
      service: cover.close_cover
      data:
        entity_id: cover.loft
    - delay:
        seconds: 10
    - alias: Stop Loft Rollershade
      service: cover.stop_cover
      data:
        entity_id: cover.loft

As long as you have a favorite position programmed to your motor via your RTS transmitter, you can just send cover.stop_cover. The stop command will mimic the MY button for your Somfy RTS motor.

If you do not have a favorite position programmed to the motor, use your RTS transmitter.

  1. move the shade to where you want your favorite position
  2. hold the MY button for a jog.
    NOTE: Isolate power! Make sure you are on the individual channel of the shade. If the shade is only in a group channel, you’ll need to power down the other shade. This may very on your motor.

Thanks for sharing that tip about the cover.stop_cover service effectively mimicking the “MY” button. It does exactly what a press of the physical button does, meaning that it will stop cover if it is in motion, but will go to the favorite setting if the cover was not already in motion. Very helpful, as it solves crazeeeyez’ problem of not knowing where the script is starting from. With that information, the script could be modified to begin with a cover.stop_cover, add a delay sufficient to allow the shade to reach the “known” favorite position, and then proceed to move up or down for a fixed number of seconds from there.

Your welcome!