Skip to content

v2.2.9 — fix frozen amortisation after reinstall (#8)

Choose a tag to compare

@hoizi89 hoizi89 released this 06 Jul 09:00

Fixed — #8: amortisation / autarky frozen after a reinstall or helper change.

Self-consumption baselines could survive a full reinstall (HA's RestoreEntity cache) while the underlying consumption / grid-import sensors were purged and recreated with different absolute meter values. The calculated self-consumption then landed below the already-tracked total, and because self-consumption is a monotonic (never-decreasing) counter, the clamp froze it — savings & amortisation stalled while grid-import cost kept ticking.

Added an automatic re-baseline: when the calculated total drifts >5 kWh below the running total, all baselines are re-anchored to the current sensor readings while keeping your accumulated total and savings. Tracking resumes on its own — no reconfiguration needed. Also covers consumption / grid-import sensor resets and stale restores.