Shading according to weather conditions

I use a small weather station, which gives me values for windspeed, sun temperatur, rain and so on.

Corresponding to the values i want to set the position of my covers.

Must haves:

  • go to position 50% if sun is shining, but not if position of cover is fully open or closed
  • go to position 100% (= open) if sun stops shining, but delay message for xx minutes
  • if sun is shining again stop timer for opening covers

I tried it with automation and node red. My problem is that i have no idea how to cancel the ‘covers up’ message.
This results in a move up and down of the covers and an angry wife.

Thanks for any help.

Hoovercraft