I tried to call adguard.enable_url
using example data, but got error code 400, invalid url or file path.
Screenshot provided.
I am using AdGuard 2.6.1.
I also tried the script/automation from another post (Social media filter), but that does not work either.
My question is how to use adguard.enable_url
. Any example or comments is appreciated.
Below are relevant logs:
Logger: homeassistant.components.websocket_api.http.connection
Source: components/adguard/__init__.py:89
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 3:10:16 AM (3 occurrences)
Last logged: 3:10:29 AM
[2824697048] ('Failed enabling URL on AdGuard Home filter', AdGuardHomeError(400, {'message': 'invalid URL or file path\n'}))
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/adguardhome/filtering.py", line 88, in enable_url
await self._adguard._request(
File "/usr/local/lib/python3.8/site-packages/adguardhome/adguardhome.py", line 121, in _request
raise AdGuardHomeError(
adguardhome.exceptions.AdGuardHomeError: (400, {'message': 'invalid URL or file path\n'})
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 135, in handle_call_service
await hass.services.async_call(
File "/usr/src/homeassistant/homeassistant/core.py", line 1451, in async_call
task.result()
File "/usr/src/homeassistant/homeassistant/core.py", line 1486, in _execute_service
await handler.job.target(service_call)
File "/usr/src/homeassistant/homeassistant/components/adguard/__init__.py", line 89, in enable_url
await adguard.filtering.enable_url(call.data.get(CONF_URL))
File "/usr/local/lib/python3.8/site-packages/adguardhome/filtering.py", line 94, in enable_url
raise AdGuardHomeError(
adguardhome.exceptions.AdGuardHomeError: ('Failed enabling URL on AdGuard Home filter', AdGuardHomeError(400, {'message': 'invalid URL or file path\n'}))