Fix Adalight power toggle using cached idle client and tracked state

Serial devices now route power on/off through the cached idle client
instead of opening a new serial connection (which caused PermissionError).
Adds tracked power_on state to DeviceState since Adalight has no
hardware power query.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-19 02:26:57 +03:00
parent 46be9922bd
commit ef925ad0a9
2 changed files with 25 additions and 5 deletions

View File

@@ -55,6 +55,8 @@ class DeviceState:
# Calibration test mode (works independently of target processing)
test_mode_active: bool = False
test_mode_edges: Dict[str, Tuple[int, int, int]] = field(default_factory=dict)
# Tracked power state for serial devices (no hardware query)
power_on: bool = True
class ProcessorManager: