Timer for switch

Hello. I need to let run motor on my exterior shutter screen for defined time. It means power should go through the switch for defined time if I want to get curtain into 1/3, 2/3 or fully close it.

Is it possible to make switch command which causes to “open” the switch for defined time (lets say 1 second) and after close it automatically? Just imagine I have button “1/3” which causes to send mqtt “open” and after 1 second mqtt "close and button “2/3” which makes the same but after 2 seconds?

@Jiran

You might consider input boolean for each. This will create a switch that can trigger an automation.

this may help: