mirror of
https://github.com/home-assistant/core.git
synced 2025-07-24 21:57:51 +00:00
Upgrade adguardhome to v0.5.0 (#47774)
This commit is contained in:
parent
daab9f9810
commit
66605b5994
@ -81,24 +81,28 @@ async def async_setup_entry(hass: HomeAssistantType, entry: ConfigEntry) -> bool
|
|||||||
async def add_url(call) -> None:
|
async def add_url(call) -> None:
|
||||||
"""Service call to add a new filter subscription to AdGuard Home."""
|
"""Service call to add a new filter subscription to AdGuard Home."""
|
||||||
await adguard.filtering.add_url(
|
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:
|
async def remove_url(call) -> None:
|
||||||
"""Service call to remove a filter subscription from AdGuard Home."""
|
"""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:
|
async def enable_url(call) -> None:
|
||||||
"""Service call to enable a filter subscription in AdGuard Home."""
|
"""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:
|
async def disable_url(call) -> None:
|
||||||
"""Service call to disable a filter subscription in AdGuard Home."""
|
"""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:
|
async def refresh(call) -> None:
|
||||||
"""Service call to refresh the filter subscriptions in AdGuard Home."""
|
"""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(
|
hass.services.async_register(
|
||||||
DOMAIN, SERVICE_ADD_URL, add_url, schema=SERVICE_ADD_URL_SCHEMA
|
DOMAIN, SERVICE_ADD_URL, add_url, schema=SERVICE_ADD_URL_SCHEMA
|
||||||
|
@ -3,6 +3,6 @@
|
|||||||
"name": "AdGuard Home",
|
"name": "AdGuard Home",
|
||||||
"config_flow": true,
|
"config_flow": true,
|
||||||
"documentation": "https://www.home-assistant.io/integrations/adguard",
|
"documentation": "https://www.home-assistant.io/integrations/adguard",
|
||||||
"requirements": ["adguardhome==0.4.2"],
|
"requirements": ["adguardhome==0.5.0"],
|
||||||
"codeowners": ["@frenck"]
|
"codeowners": ["@frenck"]
|
||||||
}
|
}
|
||||||
|
@ -232,4 +232,4 @@ class AdGuardHomeRulesCountSensor(AdGuardHomeSensor):
|
|||||||
|
|
||||||
async def _adguard_update(self) -> None:
|
async def _adguard_update(self) -> None:
|
||||||
"""Update AdGuard Home entity."""
|
"""Update AdGuard Home entity."""
|
||||||
self._state = await self.adguard.filtering.rules_count()
|
self._state = await self.adguard.filtering.rules_count(allowlist=False)
|
||||||
|
@ -111,7 +111,7 @@ adb-shell[async]==0.2.1
|
|||||||
adext==0.4.1
|
adext==0.4.1
|
||||||
|
|
||||||
# homeassistant.components.adguard
|
# homeassistant.components.adguard
|
||||||
adguardhome==0.4.2
|
adguardhome==0.5.0
|
||||||
|
|
||||||
# homeassistant.components.advantage_air
|
# homeassistant.components.advantage_air
|
||||||
advantage_air==0.2.1
|
advantage_air==0.2.1
|
||||||
|
@ -51,7 +51,7 @@ adb-shell[async]==0.2.1
|
|||||||
adext==0.4.1
|
adext==0.4.1
|
||||||
|
|
||||||
# homeassistant.components.adguard
|
# homeassistant.components.adguard
|
||||||
adguardhome==0.4.2
|
adguardhome==0.5.0
|
||||||
|
|
||||||
# homeassistant.components.advantage_air
|
# homeassistant.components.advantage_air
|
||||||
advantage_air==0.2.1
|
advantage_air==0.2.1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user