diff --git a/homeassistant/components/adguard/__init__.py b/homeassistant/components/adguard/__init__.py index 6ad7d9579a8..4015bd31bf2 100644 --- a/homeassistant/components/adguard/__init__.py +++ b/homeassistant/components/adguard/__init__.py @@ -81,24 +81,28 @@ async def async_setup_entry(hass: HomeAssistantType, entry: ConfigEntry) -> bool async def add_url(call) -> None: """Service call to add a new filter subscription to AdGuard Home.""" await adguard.filtering.add_url( - call.data.get(CONF_NAME), call.data.get(CONF_URL) + allowlist=False, name=call.data.get(CONF_NAME), url=call.data.get(CONF_URL) ) async def remove_url(call) -> None: """Service call to remove a filter subscription from AdGuard Home.""" - await adguard.filtering.remove_url(call.data.get(CONF_URL)) + await adguard.filtering.remove_url(allowlist=False, url=call.data.get(CONF_URL)) async def enable_url(call) -> None: """Service call to enable a filter subscription in AdGuard Home.""" - await adguard.filtering.enable_url(call.data.get(CONF_URL)) + await adguard.filtering.enable_url(allowlist=False, url=call.data.get(CONF_URL)) async def disable_url(call) -> None: """Service call to disable a filter subscription in AdGuard Home.""" - await adguard.filtering.disable_url(call.data.get(CONF_URL)) + await adguard.filtering.disable_url( + allowlist=False, url=call.data.get(CONF_URL) + ) async def refresh(call) -> None: """Service call to refresh the filter subscriptions in AdGuard Home.""" - await adguard.filtering.refresh(call.data.get(CONF_FORCE)) + await adguard.filtering.refresh( + allowlist=False, force=call.data.get(CONF_FORCE) + ) hass.services.async_register( DOMAIN, SERVICE_ADD_URL, add_url, schema=SERVICE_ADD_URL_SCHEMA diff --git a/homeassistant/components/adguard/manifest.json b/homeassistant/components/adguard/manifest.json index 0bcd25569a5..dd23e561364 100644 --- a/homeassistant/components/adguard/manifest.json +++ b/homeassistant/components/adguard/manifest.json @@ -3,6 +3,6 @@ "name": "AdGuard Home", "config_flow": true, "documentation": "https://www.home-assistant.io/integrations/adguard", - "requirements": ["adguardhome==0.4.2"], + "requirements": ["adguardhome==0.5.0"], "codeowners": ["@frenck"] } diff --git a/homeassistant/components/adguard/sensor.py b/homeassistant/components/adguard/sensor.py index edd9fe22ba9..3a93d9fbb35 100644 --- a/homeassistant/components/adguard/sensor.py +++ b/homeassistant/components/adguard/sensor.py @@ -232,4 +232,4 @@ class AdGuardHomeRulesCountSensor(AdGuardHomeSensor): async def _adguard_update(self) -> None: """Update AdGuard Home entity.""" - self._state = await self.adguard.filtering.rules_count() + self._state = await self.adguard.filtering.rules_count(allowlist=False) diff --git a/requirements_all.txt b/requirements_all.txt index e0260abb04d..140273de629 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -111,7 +111,7 @@ adb-shell[async]==0.2.1 adext==0.4.1 # homeassistant.components.adguard -adguardhome==0.4.2 +adguardhome==0.5.0 # homeassistant.components.advantage_air advantage_air==0.2.1 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index fbd8bbd6bc7..a2aaf83b113 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -51,7 +51,7 @@ adb-shell[async]==0.2.1 adext==0.4.1 # homeassistant.components.adguard -adguardhome==0.4.2 +adguardhome==0.5.0 # homeassistant.components.advantage_air advantage_air==0.2.1