What changed:
How to use:
I fixed Light detection propagation by storing “light:status” JSON (with “LIGHT ON/OFF”) and tuned the Fan motion thresholds so ON is detected more reliably. MetricCards now supports both legacy and new storage keys, and I added a dedicated /light page with a header link so Fan and Light have separate live views. Open /fan and /light, set the ROI and Calibrate, then verify the status pills and KPIs update in real time.
What changed and why:
To verify:
I fixed the cause of the mismatch by making the render loop depend on threshold and status, and by drawing with the current frame brightness instead of a stale state value. I added hysteresis so “OFF” only occurs when brightness ≤ threshold − hysteresis, and updated Calibrate to set the threshold above the current dark level. Canvases now size to the actual video stream, so brightness is computed correctly; the overlay and the top status will match your slider.