From b6352cf5f77a79c3e2043866d8753accaf60508b Mon Sep 17 00:00:00 2001 From: jtricerolph Date: Wed, 26 Aug 2026 10:46:00 +0000 Subject: [PATCH] =?UTF-8?q?Fix:=20scheduler=20never=20automated=20Daikin?= =?UTF-8?q?=20AC=20=E2=80=94=20missing=20from=20AC=5FDEVICE=5FTYPES?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit routes/override.js and ac-control.js's commandAcDevice() got a daikin branch when the driver was built, but scheduler.js's own separate AC_DEVICE_TYPES filter (used for automatic occupied/vacant scheduling at room state transitions) was never updated — so every scheduler tick for a zone with only a daikin device logged "No devices to command" and silently skipped it. Manual control worked fine (different code path), which is why it wasn't caught until a real unit got stuck on after a manual test. Note: this does NOT retroactively fix a unit already stuck from a missed transition — the scheduler only applies at state transitions, not continuously, so a currently-on unit needs a manual off (or the next real transition) to actually turn off. Co-Authored-By: Claude Sonnet 5 --- backend/src/lib/scheduler.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/lib/scheduler.js b/backend/src/lib/scheduler.js index eaeeca8..5e899e1 100644 --- a/backend/src/lib/scheduler.js +++ b/backend/src/lib/scheduler.js @@ -17,7 +17,7 @@ const ACTIVE_BOOKING_STATUSES = ['confirmed', 'unconfirmed', 'arrived'] const CANCELLED_STATUSES = ['cancelled', 'no_show'] const HEAT_STATES = ['heating_up', 'occupied'] const COOL_STATES = ['vacant', 'cooling_down', 'booked'] -const AC_DEVICE_TYPES = ['mhi_modbus', 'mhi_mqtt'] // matches routes/override.js's mhi-control scope +const AC_DEVICE_TYPES = ['mhi_modbus', 'mhi_mqtt', 'daikin'] // every device_type commandAcDevice() knows how to drive let timerHandle = null let running = false