Automation how can I setup a duration for switch state

Hi all.
I made automation for closing my blind following the insertion of the alarm.
Unfortunately, my motors shutters aren’t domotic friendly so I have to push the closing button till the shutters are fully closed.
How can I set the time that the button is pushed in the automation setup?
I am using the front end for setting up automation and in action I have
device
shelly
activation ( shelly name)

thank you
Andrea

Solved.
Added delay
and then the same device and switch off