Automating AdGuard blocked services?

Hi ,
I have found a solution and reported here

https://community.home-assistant.io/t/automation-to-turn-on-and-off-switches-on-adguard-home/489148/5