Pi-hole switch custom duration

Hello, unfortunately I currently have a small problem with the Pi-hole integration in Home Assistant. I have seen there is the possibility to disable the pi-hole for a certain time via a service. However, I would like to have a fixed switch for this (e.g. always 10 min, etc). This is already possible with the existing standard switch via an automation but not the optimal solution, because as soon as you stop the Pi-hole via the website, this automation does not work properly.

I have already tested many configurations of switches without success, here my last configuration:

I am running the pi-hole on system system, but this shouldn’t be the problem.
Would be cool if someone here has ne idea whether this is feasible at all, or what possibilities are still available.