- Optimize KC frame processing: downsample to 160x90 with cv2.resize before rectangle extraction, pre-compute pixel coords, vectorize smoothing with numpy arrays - Add WebSocket event stream for server state changes: processor manager fires events on start/stop, new /api/v1/events/ws endpoint streams them to connected clients - Add HAOS EventStreamListener that triggers coordinator refresh on state changes for near-instant switch updates - Reduce HAOS polling interval from 10s to 3s for fresher FPS metrics - Fix overlay button tooltips: flatten nested JSON keys in locale files to match flat dot-notation lookup used by t() function Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
23 lines
559 B
Python
23 lines
559 B
Python
"""Constants for the LED Screen Controller integration."""
|
|
|
|
DOMAIN = "wled_screen_controller"
|
|
|
|
# Configuration
|
|
CONF_SERVER_URL = "server_url"
|
|
CONF_API_KEY = "api_key"
|
|
|
|
# Default values
|
|
DEFAULT_SCAN_INTERVAL = 3 # seconds
|
|
DEFAULT_TIMEOUT = 10 # seconds
|
|
WS_RECONNECT_DELAY = 5 # seconds
|
|
WS_MAX_RECONNECT_DELAY = 60 # seconds
|
|
|
|
# Target types
|
|
TARGET_TYPE_LED = "led"
|
|
TARGET_TYPE_KEY_COLORS = "key_colors"
|
|
|
|
# Data keys stored in hass.data[DOMAIN][entry_id]
|
|
DATA_COORDINATOR = "coordinator"
|
|
DATA_WS_MANAGER = "ws_manager"
|
|
DATA_EVENT_LISTENER = "event_listener"
|