feat(settings): server global brightness and Wi-Fi driver resync
- Serve GET /settings as JSON by removing duplicate HTML route (use /settings/page for the standalone UI). - Save global_brightness via PUT; broadcast to connected drivers; push saved level when outbound WS connects. - Zones UI loads brightness from GET /settings only (no localStorage). - Bump led-driver submodule for settings.save on brightness with save flag. - Extend API doc and endpoint tests for global_brightness. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -73,6 +73,9 @@ class Settings(dict):
|
||||
# UART to ESP32 ESP-NOW bridge; default off (Wi-Fi drivers need no serial).
|
||||
if 'serial_enabled' not in self:
|
||||
self['serial_enabled'] = False
|
||||
# Zone UI global brightness (0–255); shared across browsers/devices.
|
||||
if 'global_brightness' not in self:
|
||||
self['global_brightness'] = 255
|
||||
|
||||
def save(self):
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user