Adguard Home Services

Hello, would it be possible to use the switches in the adguardHome integration to turn off and on certain services? Like toggling YouTube access or Facebook, etc. Also would it be possible to create new services and toggle those? Specifically looking to block roblox. Now I have 2 items in my custom filter rules list that I need to manually comment/uncomment out, would be great to have a toggle switch. Thank you

I’m not familiar with AdGuard, could you not use the services enable/disable URL?

Not sure how, the pre-built services just have a toggle button on the GUI. For something like roblox, not sure how to add 2 urls to the 1 automation.

Call the service with the first URL, then call the service with the second URL. You can have as many actions as you like in an automation/script.

I’d create a template switch, and in the turn on action enable the two URLs and in the turn off action diaable the two URLs.

Thanks, I’ll look into templates, would be nice if it was more integrated though.

The services TomNow007 is referring to are javascript toggles in the web GUI for AdGuard. You can’t call on them with the enable/disable URL service call.

Alternatively, you can create your own custom blocklist text file, save it on a webserver, then use the service call to disable/enable that URL. Problem with that is 1) I’ve read the file has to be stored on a webserver, local files won’t be accepted, and 2) you have to take your own guess at what to put in the blocklist you create vs using the builtin stuff AdGuard is using, so it will be hard to have the exact same effect.

Thanks, I actually tried creating an automation to block youtube using lists and it ‘kind of’ works. I get this error though:
Traceback (most recent call last):
File “/usr/local/lib/python3.9/site-packages/adguardhome/filtering.py”, line 124, in add_url
await self._adguard.request(
File “/usr/local/lib/python3.9/site-packages/adguardhome/adguardhome.py”, line 164, in request
raise AdGuardHomeError(
adguardhome.exceptions.AdGuardHomeError: (400, {‘message’: ‘Filter URL already added – https://raw.githubusercontent.com/d43m0nhLInt3r/socialblocklists/master/Youtube/youtubeblocklist.txt\n’})