* docs: add Home Assistant 0.4.0 hardening roadmap * fix: protect media credentials and resume state * feat: authenticate RelayTV API operations * fix: make targeting and media state reliable * test: add Home Assistant integration CI * fix: validate API credentials during setup * release: prepare HACS 0.4.0 * fix: align pytest dependency pin * fix: close URL sanitizer gaps and correct player state reporting Sync the sensitive-query-key list with the RelayTV server (adds auth, exp, jwt, X-Emby-Token, X-Jellyfin-Token), filter query credentials from relative URLs instead of returning them verbatim, and preserve brackets around IPv6 literal hosts. Also report volume on RelayTV's 0-100 scale unconditionally (a raw 1 is 1%, not full volume) and give the coordinator its own position_updated_at stamp — the base DataUpdateCoordinator has no last_update_success_time, so media_position_updated_at silently fell back to now() on every read and the seek bar never extrapolated. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
42 lines
1.2 KiB
Python
42 lines
1.2 KiB
Python
"""Constants for the RelayTV Web UI panel integration."""
|
|
|
|
DOMAIN = "relaytv"
|
|
|
|
PLATFORMS: list[str] = ["media_player"]
|
|
|
|
CONF_BASE_URL = "base_url"
|
|
CONF_API_TOKEN = "api_token"
|
|
CONF_SERVER_NAME = "server_name"
|
|
CONF_PANEL_TITLE = "panel_title"
|
|
CONF_PANEL_ICON = "panel_icon"
|
|
CONF_PANEL_PATH = "panel_path"
|
|
CONF_PANEL_ENABLED = "panel_enabled"
|
|
CONF_PANEL_TARGET_ENTRY_ID = "panel_target_entry_id"
|
|
|
|
DEFAULT_PANEL_TITLE = "RelayTV"
|
|
DEFAULT_PANEL_ICON = "mdi:cast"
|
|
DEFAULT_PANEL_PATH = "relaytv"
|
|
|
|
# Services
|
|
SERVICE_SMART_URL = "smart_url"
|
|
SERVICE_PLAY_NOW = "play_now"
|
|
SERVICE_ANNOUNCE = "announce"
|
|
SERVICE_PLAY_TEMPORARY = "play_temporary"
|
|
SERVICE_OVERLAY = "overlay"
|
|
SERVICE_PLAY_SYNCED = "play_synced"
|
|
SERVICE_SNAPSHOT = "snapshot"
|
|
SERVICE_PLAY_WITH_RESUME = "play_with_resume"
|
|
SERVICE_UPLOAD_MEDIA = "upload_media"
|
|
SERVICE_UPLOAD_MEDIA_PLAY = "upload_media_play"
|
|
SERVICE_UPLOAD_MEDIA_ENQUEUE = "upload_media_enqueue"
|
|
|
|
CONF_SENSOR_STREAM_MAPPINGS = "sensor_stream_mappings"
|
|
CONF_RESUME_POSITIONS = "resume_positions"
|
|
|
|
# Data keys
|
|
DATA_COORDINATOR = "coordinator"
|
|
DATA_API = "api"
|
|
DATA_STORE = "store"
|
|
DATA_PANEL_SETTINGS = "panel_settings"
|
|
DATA_LAST_SNAPSHOT_URL = "last_snapshot_url"
|