Xiaomi curtain

Good evening! I really need help.
I have a xiaomi wifi switch and xiaomi curtains. The switch has a state only click and the curtains have open-stop-closed positions. I tried to implement automation through a toggle, but then the position changes only open-closed.
How to implement to change open-stop-close-stop-open?