/
/
/
1"""Config constants for the Hue Lights Sync provider."""
2
3from __future__ import annotations
4
5from typing import Final
6
7CONF_BRIDGE_HOST: Final[str] = "bridge_host"
8CONF_BRIDGE_ID: Final[str] = "bridge_id"
9CONF_ACTION_PAIR: Final[str] = "pair"
10CONF_USERNAME: Final[str] = "hue_username"
11CONF_CLIENTKEY: Final[str] = "hue_clientkey"
12CONF_BRIGHTNESS: Final[str] = "brightness"
13CONF_COLOR_MODE: Final[str] = "color_mode"
14CONF_HUE_LATENCY_MS: Final[str] = "hue_latency_ms"
15
16# Visualization modes; first entry is the default. Used to build the config
17# options and to migrate away orphaned stored values from older versions.
18COLOR_MODES: Final[tuple[str, ...]] = ("smooth", "ambient", "flashing", "energetic")
19DEFAULT_COLOR_MODE: Final[str] = COLOR_MODES[0]
20
21DEFAULT_BRIGHTNESS: Final[int] = 100
22
23DEFAULT_HUE_LATENCY_MS: Final[int] = 20
24
25HUE_MDNS_TYPE: Final[str] = "_hue._tcp.local."
26
27# The devicetype registered with the Hue bridge during pairing. Shown in the
28# Hue app's list of linked apps; keeps Music Assistant's identity on (re)pair.
29HUE_DEVICE_TYPE: Final[str] = "music_assistant#hue_entertainment"
30
31# ---- Spectrum config requested from the Sendspin visualizer ----
32
33# 17 mel bins over 20-20kHz: enough resolution to map distinct bands to lights
34# while keeping the per-frame payload small (bin ~10 â 3.5kHz is the musical
35# ceiling, see _CHANNEL_BIN_MAX in the analyzer).
36SPECTRUM_BINS: Final[int] = 17
37SPECTRUM_SCALE: Final = "mel"
38SPECTRUM_F_MIN: Final[int] = 20
39SPECTRUM_F_MAX: Final[int] = 20000
40