Button to toggle between to automations

As a NewBie I might be on a wrong track, but I have to Shelly 2PM to operate two blinds. As I don’t like fully closed blinds, I’ve set up an automation to close the blinds at sunset to fixed positions and open them at sunrise again. I would like to be able to add a simple button to the “smart home control panel”, that checks if the blinds are open or not and dependent on that state the button either calls the sunset-automation or the sunrise one (or simply opens the blinds if they are not open).

All I find is how to call two different automations, but not how to apply the condition depending if the blinds are open or not?

Thanks for any advise directing my attention to a solution.

First write a script that makes that determination in condition and does what you want every time…

Once the script is reliable trigger that script from a button on the dashboard. That parts the easy part. After you have the script.

If you have that script post it here (make sure you use preformatted text, please don’t paste screenshots of text) and im sure people will help.