Revert "fix: Complete fixes: tests, workflows, coverage"
This reverts commit ed94d40e96
.
This commit is contained in:
@@ -1,75 +1,96 @@
|
||||
"""Constants for AdGuard Control Hub."""
|
||||
from homeassistant.const import Platform
|
||||
"""Constants for the AdGuard Control Hub integration."""
|
||||
from typing import Final
|
||||
|
||||
# Integration metadata
|
||||
DOMAIN = "adguard_hub"
|
||||
MANUFACTURER = "AdGuard" # FIXED: Added missing MANUFACTURER constant
|
||||
SCAN_INTERVAL = 30
|
||||
DEFAULT_PORT = 3000
|
||||
DEFAULT_SSL = False
|
||||
DEFAULT_VERIFY_SSL = True
|
||||
# Integration details
|
||||
DOMAIN: Final = "adguard_hub"
|
||||
MANUFACTURER: Final = "AdGuard Control Hub"
|
||||
INTEGRATION_NAME: Final = "AdGuard Control Hub"
|
||||
|
||||
# Configuration keys
|
||||
CONF_SSL = "ssl"
|
||||
CONF_VERIFY_SSL = "verify_ssl"
|
||||
# Configuration
|
||||
CONF_SSL: Final = "ssl"
|
||||
CONF_VERIFY_SSL: Final = "verify_ssl"
|
||||
|
||||
# Defaults
|
||||
DEFAULT_PORT: Final = 3000
|
||||
DEFAULT_SSL: Final = False
|
||||
DEFAULT_VERIFY_SSL: Final = True
|
||||
SCAN_INTERVAL: Final = 30
|
||||
|
||||
# Platforms
|
||||
PLATFORMS = [
|
||||
Platform.SWITCH,
|
||||
Platform.BINARY_SENSOR,
|
||||
Platform.SENSOR,
|
||||
PLATFORMS: Final = [
|
||||
"switch",
|
||||
"binary_sensor",
|
||||
"sensor",
|
||||
]
|
||||
|
||||
# Entity attributes
|
||||
ATTR_CLIENT_NAME = "client_name"
|
||||
ATTR_SERVICES = "services"
|
||||
ATTR_DURATION = "duration"
|
||||
ATTR_CLIENTS = "clients"
|
||||
ATTR_ENABLED = "enabled"
|
||||
|
||||
# Service names
|
||||
SERVICE_BLOCK_SERVICES = "block_services"
|
||||
SERVICE_UNBLOCK_SERVICES = "unblock_services"
|
||||
SERVICE_EMERGENCY_UNBLOCK = "emergency_unblock"
|
||||
SERVICE_ADD_CLIENT = "add_client"
|
||||
SERVICE_REMOVE_CLIENT = "remove_client"
|
||||
SERVICE_REFRESH_DATA = "refresh_data"
|
||||
|
||||
# API endpoints
|
||||
API_ENDPOINTS = {
|
||||
# API Endpoints
|
||||
API_ENDPOINTS: Final = {
|
||||
"status": "/control/status",
|
||||
"clients": "/control/clients",
|
||||
"stats": "/control/stats",
|
||||
"protection": "/control/protection",
|
||||
"clients_add": "/control/clients/add",
|
||||
"clients_update": "/control/clients/update",
|
||||
"clients_update": "/control/clients/update",
|
||||
"clients_delete": "/control/clients/delete",
|
||||
"blocked_services_all": "/control/blocked_services/all",
|
||||
"protection": "/control/protection",
|
||||
"stats": "/control/stats",
|
||||
"rewrite": "/control/rewrite/list",
|
||||
"querylog": "/control/querylog",
|
||||
}
|
||||
|
||||
# Available services for blocking
|
||||
BLOCKED_SERVICES = {
|
||||
# Available blocked services (common ones)
|
||||
BLOCKED_SERVICES: Final = {
|
||||
"youtube": "YouTube",
|
||||
"facebook": "Facebook",
|
||||
"netflix": "Netflix",
|
||||
"gaming": "Gaming Services",
|
||||
"facebook": "Facebook",
|
||||
"twitter": "Twitter",
|
||||
"instagram": "Instagram",
|
||||
"snapchat": "Snapchat",
|
||||
"telegram": "Telegram",
|
||||
"whatsapp": "WhatsApp",
|
||||
"discord": "Discord",
|
||||
"skype": "Skype",
|
||||
"linkedin": "LinkedIn",
|
||||
"pinterest": "Pinterest",
|
||||
"reddit": "Reddit",
|
||||
"tiktok": "TikTok",
|
||||
"amazon_prime": "Amazon Prime Video",
|
||||
"twitter": "Twitter/X",
|
||||
"snapchat": "Snapchat",
|
||||
"reddit": "Reddit",
|
||||
"disney_plus": "Disney+",
|
||||
"hulu": "Hulu",
|
||||
"spotify": "Spotify",
|
||||
"twitch": "Twitch",
|
||||
"steam": "Steam",
|
||||
"epic_games": "Epic Games",
|
||||
"xbox_live": "Xbox Live",
|
||||
"whatsapp": "WhatsApp",
|
||||
"telegram": "Telegram",
|
||||
"discord": "Discord",
|
||||
"amazon": "Amazon",
|
||||
"ebay": "eBay",
|
||||
"skype": "Skype",
|
||||
"zoom": "Zoom",
|
||||
"tinder": "Tinder",
|
||||
"pinterest": "Pinterest",
|
||||
"linkedin": "LinkedIn",
|
||||
"dailymotion": "Dailymotion",
|
||||
"vimeo": "Vimeo",
|
||||
"viber": "Viber",
|
||||
"wechat": "WeChat",
|
||||
"ok": "Odnoklassniki",
|
||||
"vk": "VKontakte",
|
||||
}
|
||||
|
||||
# Service attributes
|
||||
ATTR_CLIENT_NAME: Final = "client_name"
|
||||
ATTR_SERVICES: Final = "services"
|
||||
ATTR_DURATION: Final = "duration"
|
||||
ATTR_CLIENTS: Final = "clients"
|
||||
ATTR_ENABLED: Final = "enabled"
|
||||
|
||||
# Icons
|
||||
ICON_PROTECTION: Final = "mdi:shield"
|
||||
ICON_PROTECTION_OFF: Final = "mdi:shield-off"
|
||||
ICON_CLIENT: Final = "mdi:devices"
|
||||
ICON_STATISTICS: Final = "mdi:chart-line"
|
||||
ICON_BLOCKED: Final = "mdi:shield-check"
|
||||
ICON_QUERIES: Final = "mdi:dns"
|
||||
ICON_PERCENTAGE: Final = "mdi:percent"
|
||||
ICON_CLIENTS: Final = "mdi:account-multiple"
|
||||
|
||||
# Service names
|
||||
SERVICE_BLOCK_SERVICES: Final = "block_services"
|
||||
SERVICE_UNBLOCK_SERVICES: Final = "unblock_services"
|
||||
SERVICE_EMERGENCY_UNBLOCK: Final = "emergency_unblock"
|
||||
SERVICE_ADD_CLIENT: Final = "add_client"
|
||||
SERVICE_REMOVE_CLIENT: Final = "remove_client"
|
||||
SERVICE_REFRESH_DATA: Final = "refresh_data"
|
||||
|
Reference in New Issue
Block a user