Add software brightness control for Adalight devices

Emulates hardware brightness by multiplying pixel values before serial
send. Stored per-device and persisted across restarts.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-18 10:56:19 +03:00
parent 27c97c3141
commit 77dd342c4c
5 changed files with 31 additions and 4 deletions

View File

@@ -157,6 +157,7 @@ async def lifespan(app: FastAPI):
calibration=device.calibration,
device_type=device.device_type,
baud_rate=device.baud_rate,
software_brightness=device.software_brightness,
)
logger.info(f"Registered device: {device.name} ({device.id})")
except Exception as e: