No description
Find a file
jtricerolph d10e4884b8 Add global occupied/vacant default templates with per-room overrides
Settings gains a 'Default Templates' section: arrival-prep/departure-prep offsets,
a default aircon template (on/off, mode, setpoint, fan speed x occupied/vacant), and
default TRV setpoints. Every room can individually override any of these fields via
per-field 'Override' toggles in its Schedule modal, falling back to the global
default when not overridden.

Backend:
- zones table: occupied_temp/vacant_temp/heating_offset_min/cooling_offset_min are
  now nullable (NULL = inherit default); existing values preserved as explicit
  per-room overrides, so no room's behaviour changes on deploy. 8 new nullable
  ac_occupied_*/ac_vacant_* override columns.
- New 'hvac_defaults' config key (generic config store) holds the global template.
- scheduler.js: resolves each field as zone-override ?? global-default, and now
  also drives AC state automatically on occupancy transitions (previously AC was
  100% manual) via the same command path the manual control panel uses.
- lib/ac-control.js: factored the mhi_mqtt/mhi_modbus command logic out of
  routes/override.js so the scheduler and the manual control route share one path.
- zones.js PATCH: explicit-null-clears-override semantics for the 12 overridable
  fields (distinct from omitting the key, which leaves the value unchanged).

Frontend:
- Settings.tsx: new Default Templates section matching the requested layout.
- ZoneDetailModal.tsx: per-field Override checkboxes for offsets, AC
  occupied/vacant template, and TRV occupied/vacant setpoints.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-25 09:48:28 +00:00
backend Add global occupied/vacant default templates with per-room overrides 2026-08-25 09:48:28 +00:00
docs Add Phase 2 MHI Modbus register-map profile, xlsx importer, and a 2026-07-27 14:19:58 +00:00
frontend Add global occupied/vacant default templates with per-room overrides 2026-08-25 09:48:28 +00:00
.gitignore Add Phase 2 MHI Modbus register-map profile, xlsx importer, and a 2026-07-27 14:19:58 +00:00
docker-compose.yml hvac: fetch MQTT credentials from Settings (drop .env secret) 2026-08-13 13:42:58 +00:00
seed-app.js Scaffold Phase 1 hvac app — NewBook-driven room TRV heating scheduler 2026-07-26 18:00:42 +00:00