Skip to content

v1.9.0 — Time-window-aware battery projection

Choose a tag to compare

@xchillxx xchillxx released this 19 Jul 11:20

The overnight battery projection is now time-window-aware. Previously every committed device was assumed to keep drawing its predicted power all the way to solar start, even one with a known schedule/window cutoff (e.g. a pool pump that stops at a fixed time regardless of battery state) — making lower-priority devices' projections needlessly pessimistic after that cutoff.

The projection is now piecewise: each committed device carries its own effective cutoff — a schedule.* helper's next_event while it's on, a window_end time, or inherited from a prerequisite device it depends on (the earliest of these wins) — and drops out of the projected load at that point instead of being assumed to run the full remaining horizon.

With no time windows/schedules configured at all, this reduces to exactly the previous constant-rate calculation — no behavior change for simple setups. Verified against the old formula plus three cutoff scenarios (single cutoff, dependency-inherited cutoff, cutoff beyond the projection horizon) before release.

Each device's power-tracking sensor also gains a naechster_cutoff attribute showing the cutoff time used in its own projection, if any.