feat(zones): persist per-zone brightness and update submodules

Store zone brightness in model/data flow, apply it in the zones UI, and record updated led-driver, led-simulator, and led-tool submodule pointers.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-05-04 22:49:06 +12:00
parent 827eb97203
commit 7ccab6fbc4
10 changed files with 300 additions and 51 deletions

View File

@@ -124,15 +124,6 @@ def _register_ws(ip: str, ws) -> None:
_send_locks[key] = asyncio.Lock()
_schedule_status_broadcast(key, True)
print(f"[WS] driver connected {key!r}")
try:
loop = asyncio.get_running_loop()
except RuntimeError:
return
async def _apply_saved_brightness():
await sync_global_brightness_to_driver(key)
loop.create_task(_apply_saved_brightness())
def unregister_tcp_writer(peer_ip: str, ws=None) -> str:

View File

@@ -34,6 +34,7 @@ class Zone(Model):
"names": names if names else [],
"presets": presets if presets else [],
"default_preset": None,
"brightness": 255,
}
self.save()
return next_id