67 lines
1.6 KiB
Python
67 lines
1.6 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",
|
|
"protection": "/control/protection",
|
|
"stats": "/control/stats",
|
|
}
|
|
|
|
# Available blocked services
|
|
BLOCKED_SERVICES: Final = {
|
|
"youtube": "YouTube",
|
|
"facebook": "Facebook",
|
|
"netflix": "Netflix",
|
|
"gaming": "Gaming Services",
|
|
"instagram": "Instagram",
|
|
"tiktok": "TikTok",
|
|
"twitter": "Twitter/X",
|
|
"snapchat": "Snapchat",
|
|
"reddit": "Reddit",
|
|
"disney_plus": "Disney+",
|
|
"spotify": "Spotify",
|
|
"twitch": "Twitch",
|
|
"steam": "Steam",
|
|
"whatsapp": "WhatsApp",
|
|
"telegram": "Telegram",
|
|
"discord": "Discord",
|
|
}
|
|
|
|
# Service attributes
|
|
ATTR_CLIENT_NAME: Final = "client_name"
|
|
ATTR_SERVICES: Final = "services"
|
|
ATTR_DURATION: Final = "duration"
|
|
ATTR_CLIENTS: Final = "clients"
|
|
|
|
# Icons
|
|
ICON_PROTECTION: Final = "mdi:shield"
|
|
ICON_PROTECTION_OFF: Final = "mdi:shield-off"
|
|
ICON_CLIENT: Final = "mdi:devices"
|
|
ICON_STATISTICS: Final = "mdi:chart-line"
|