How to set specific timer

Hi everyone, my name is Edoardo and I’m creating a hydroponic system integrated into the Home Assistant… I’m currently using ESPHome to control an electric pump. It works perfectly, although, I would need to set an on and off timer. Specifically I need the pump to be on for 20 minutes every hour. I would also like to be able to insert a slider that allows setting the period of activity of the pump and the period of inactivity. I know that it is possible to do all this through automations, but not being very practical with Home Assistant, I ask you if you could help me!

There is a schedule helper which you might try, but it’s not very flexible as yet - minimum “on” period is 30 min, for example. There’s also an add-on which I have not used myself:

Thanks, I’ll definitely take a look! But isn’t there a way to make this timer using code?