- FastAPI server for Windows media control via WinRT/SMTC - Home Assistant custom integration with media player entity - Script button entities for system commands - Position tracking with grace period for track skip handling - Server availability detection in HA entity Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
37 lines
874 B
Python
37 lines
874 B
Python
"""Constants for the Remote Media Player integration."""
|
|
|
|
DOMAIN = "remote_media_player"
|
|
|
|
# Configuration keys
|
|
CONF_HOST = "host"
|
|
CONF_PORT = "port"
|
|
CONF_TOKEN = "token"
|
|
CONF_POLL_INTERVAL = "poll_interval"
|
|
CONF_NAME = "name"
|
|
|
|
# Default values
|
|
DEFAULT_PORT = 8765
|
|
DEFAULT_POLL_INTERVAL = 5
|
|
DEFAULT_NAME = "Remote Media Player"
|
|
|
|
# API endpoints
|
|
API_HEALTH = "/api/health"
|
|
API_STATUS = "/api/media/status"
|
|
API_PLAY = "/api/media/play"
|
|
API_PAUSE = "/api/media/pause"
|
|
API_STOP = "/api/media/stop"
|
|
API_NEXT = "/api/media/next"
|
|
API_PREVIOUS = "/api/media/previous"
|
|
API_VOLUME = "/api/media/volume"
|
|
API_MUTE = "/api/media/mute"
|
|
API_SEEK = "/api/media/seek"
|
|
API_SCRIPTS_LIST = "/api/scripts/list"
|
|
API_SCRIPTS_EXECUTE = "/api/scripts/execute"
|
|
|
|
# Service names
|
|
SERVICE_EXECUTE_SCRIPT = "execute_script"
|
|
|
|
# Service attributes
|
|
ATTR_SCRIPT_NAME = "script_name"
|
|
ATTR_SCRIPT_ARGS = "args"
|