fix: minor fixes
Some checks failed
🧪 Integration Testing / 🔧 Test Integration (2025.9.4, 3.10) (push) Failing after 32s
🧪 Integration Testing / 🔧 Test Integration (2025.9.4, 3.11) (push) Failing after 14s
🧪 Integration Testing / 🔧 Test Integration (2025.9.4, 3.12) (push) Failing after 15s
🧪 Integration Testing / 🔧 Test Integration (2025.9.4, 3.13) (push) Failing after 1m57s
🧪 Integration Testing / 🔧 Test Integration (2025.9.4, 3.9) (push) Failing after 28s
🛡️ Code Quality & Security Check / 🔍 Code Quality Analysis (push) Failing after 19s
Some checks failed
🧪 Integration Testing / 🔧 Test Integration (2025.9.4, 3.10) (push) Failing after 32s
🧪 Integration Testing / 🔧 Test Integration (2025.9.4, 3.11) (push) Failing after 14s
🧪 Integration Testing / 🔧 Test Integration (2025.9.4, 3.12) (push) Failing after 15s
🧪 Integration Testing / 🔧 Test Integration (2025.9.4, 3.13) (push) Failing after 1m57s
🧪 Integration Testing / 🔧 Test Integration (2025.9.4, 3.9) (push) Failing after 28s
🛡️ Code Quality & Security Check / 🔍 Code Quality Analysis (push) Failing after 19s
Signed-off-by: Rafal Zielinski <sq4ind@gmail.com>
This commit is contained in:
@@ -7,11 +7,12 @@ from .const import API_ENDPOINTS
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class AdGuardHomeAPI:
|
||||
"""API wrapper for AdGuard Home."""
|
||||
|
||||
def __init__(self, host: str, port: int = 3000, username: str = None,
|
||||
password: str = None, ssl: bool = False, session = None):
|
||||
def __init__(self, host: str, port: int = 3000, username: str = None,
|
||||
password: str = None, ssl: bool = False, session=None):
|
||||
self.host = host
|
||||
self.port = port
|
||||
self.username = username
|
||||
@@ -88,7 +89,8 @@ class AdGuardHomeAPI:
|
||||
|
||||
return None
|
||||
|
||||
async def update_client_blocked_services(self, client_name: str, blocked_services: list, schedule: dict = None) -> dict:
|
||||
async def update_client_blocked_services(self, client_name: str, blocked_services: list,
|
||||
schedule: dict = None) -> dict:
|
||||
"""Update blocked services for a specific client."""
|
||||
client = await self.get_client_by_name(client_name)
|
||||
if not client:
|
||||
@@ -139,4 +141,4 @@ class AdGuardHomeAPI:
|
||||
elif not enabled and service_id in service_ids:
|
||||
service_ids.remove(service_id)
|
||||
|
||||
return await self.update_client_blocked_services(client_name, service_ids)
|
||||
return await self.update_client_blocked_services(client_name, service_ids)
|
||||
|
Reference in New Issue
Block a user