Revert "fix: Hopefully fixes all problems"
This reverts commit c85173e0e9
.
This commit is contained in:
3
.flake8
3
.flake8
@@ -1,3 +1,4 @@
|
|||||||
[flake8]
|
[flake8]
|
||||||
exclude = .venv,.git,__pycache__,docs/source/conf.py,old,build,dist
|
|
||||||
max-line-length = 127
|
max-line-length = 127
|
||||||
|
exclude = .git,__pycache__,.venv,venv,.pytest_cache
|
||||||
|
ignore = E203,W503,E501
|
||||||
|
@@ -20,7 +20,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
python-version: '3.13'
|
python-version: '3.13'
|
||||||
|
|
||||||
# FIXED: Added cache configuration
|
|
||||||
- name: Cache pip dependencies
|
- name: Cache pip dependencies
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
|
@@ -3,7 +3,7 @@ from homeassistant.const import Platform
|
|||||||
|
|
||||||
# Integration metadata
|
# Integration metadata
|
||||||
DOMAIN = "adguard_hub"
|
DOMAIN = "adguard_hub"
|
||||||
MANUFACTURER = "AdGuard"
|
MANUFACTURER = "AdGuard" # FIXED: Added missing MANUFACTURER constant
|
||||||
SCAN_INTERVAL = 30
|
SCAN_INTERVAL = 30
|
||||||
DEFAULT_PORT = 3000
|
DEFAULT_PORT = 3000
|
||||||
DEFAULT_SSL = False
|
DEFAULT_SSL = False
|
||||||
|
@@ -35,6 +35,7 @@ class AdGuardControlHubServices:
|
|||||||
|
|
||||||
def register_services(self) -> None:
|
def register_services(self) -> None:
|
||||||
"""Register services."""
|
"""Register services."""
|
||||||
|
# FIXED: All service constants are now properly defined
|
||||||
self.hass.services.register(
|
self.hass.services.register(
|
||||||
DOMAIN,
|
DOMAIN,
|
||||||
SERVICE_BLOCK_SERVICES,
|
SERVICE_BLOCK_SERVICES,
|
||||||
|
@@ -52,7 +52,7 @@ class AdGuardProtectionSwitch(CoordinatorEntity, SwitchEntity):
|
|||||||
return DeviceInfo(
|
return DeviceInfo(
|
||||||
identifiers={(DOMAIN, "adguard_home")},
|
identifiers={(DOMAIN, "adguard_home")},
|
||||||
name="AdGuard Home",
|
name="AdGuard Home",
|
||||||
manufacturer=MANUFACTURER,
|
manufacturer=MANUFACTURER, # FIXED: Now uses imported MANUFACTURER
|
||||||
model="AdGuard Home",
|
model="AdGuard Home",
|
||||||
configuration_url=self.api.base_url,
|
configuration_url=self.api.base_url,
|
||||||
)
|
)
|
||||||
|
@@ -16,7 +16,7 @@ addopts = [
|
|||||||
"--cov=custom_components.adguard_hub",
|
"--cov=custom_components.adguard_hub",
|
||||||
"--cov-report=term-missing",
|
"--cov-report=term-missing",
|
||||||
"--cov-report=html",
|
"--cov-report=html",
|
||||||
"--cov-fail-under=60",
|
"--cov-fail-under=70",
|
||||||
"--asyncio-mode=auto",
|
"--asyncio-mode=auto",
|
||||||
"-v"
|
"-v"
|
||||||
]
|
]
|
||||||
|
@@ -1,5 +1,4 @@
|
|||||||
"""Test AdGuard Home API client."""
|
"""Test AdGuard Home API client."""
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from unittest.mock import AsyncMock, patch
|
from unittest.mock import AsyncMock, patch
|
||||||
import aiohttp
|
import aiohttp
|
||||||
|
Reference in New Issue
Block a user