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:
@@ -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:
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user