93 lines
2.3 KiB
Python
93 lines
2.3 KiB
Python
"""Constants for the AdGuard Control Hub integration."""
|
|
from typing import Final
|
|
|
|
DOMAIN: Final = "adguard_hub"
|
|
MANUFACTURER: Final = "AdGuard Control Hub"
|
|
|
|
# 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: Final = [
|
|
"switch",
|
|
"binary_sensor",
|
|
"sensor",
|
|
]
|
|
|
|
# API Endpoints
|
|
API_ENDPOINTS: Final = {
|
|
"status": "/control/status",
|
|
"clients": "/control/clients",
|
|
"clients_add": "/control/clients/add",
|
|
"clients_update": "/control/clients/update",
|
|
"clients_delete": "/control/clients/delete",
|
|
"blocked_services_all": "/control/blocked_services/all",
|
|
"blocked_services_get": "/control/blocked_services/get",
|
|
"blocked_services_update": "/control/blocked_services/update",
|
|
"protection": "/control/protection",
|
|
"stats": "/control/stats",
|
|
}
|
|
|
|
# Available blocked services with friendly names
|
|
BLOCKED_SERVICES: Final = {
|
|
# Social Media
|
|
"youtube": "YouTube",
|
|
"facebook": "Facebook",
|
|
"instagram": "Instagram",
|
|
"tiktok": "TikTok",
|
|
"twitter": "Twitter/X",
|
|
"snapchat": "Snapchat",
|
|
"reddit": "Reddit",
|
|
|
|
# Entertainment
|
|
"netflix": "Netflix",
|
|
"disney_plus": "Disney+",
|
|
"spotify": "Spotify",
|
|
"twitch": "Twitch",
|
|
|
|
# Gaming
|
|
"gaming": "Gaming Services",
|
|
"steam": "Steam",
|
|
"epic_games": "Epic Games",
|
|
"roblox": "Roblox",
|
|
|
|
# Shopping
|
|
"amazon": "Amazon",
|
|
"ebay": "eBay",
|
|
|
|
# Communication
|
|
"whatsapp": "WhatsApp",
|
|
"telegram": "Telegram",
|
|
"discord": "Discord",
|
|
|
|
# Other
|
|
"adult": "Adult Content",
|
|
"gambling": "Gambling Sites",
|
|
"torrents": "Torrent Sites",
|
|
}
|
|
|
|
# Service attributes
|
|
ATTR_CLIENT_NAME: Final = "client_name"
|
|
ATTR_SERVICES: Final = "services"
|
|
ATTR_DURATION: Final = "duration"
|
|
ATTR_CLIENTS: Final = "clients"
|
|
ATTR_CLIENT_PATTERN: Final = "client_pattern"
|
|
ATTR_SETTINGS: Final = "settings"
|
|
|
|
# Icons
|
|
ICON_HUB: Final = "mdi:router-network"
|
|
ICON_PROTECTION: Final = "mdi:shield"
|
|
ICON_PROTECTION_OFF: Final = "mdi:shield-off"
|
|
ICON_CLIENT: Final = "mdi:devices"
|
|
ICON_CLIENT_OFFLINE: Final = "mdi:devices-off"
|
|
ICON_BLOCKED_SERVICE: Final = "mdi:block-helper"
|
|
ICON_ALLOWED_SERVICE: Final = "mdi:check-circle"
|
|
ICON_STATISTICS: Final = "mdi:chart-line"
|