Fix SoC balance on battery export and improve evening push (v39).
Some checks failed
CI and deploy / migration-check (push) Failing after 38s
CI and deploy / deploy (push) Has been skipped

SoC continuity now deducts only bd (ge_bat was double-counted via energy
balance), which stopped the plan from draining ~2× faster than BMS during
evening BATTERY_SELL. Also ships dynamic evening push budget + rolling
hysteresis (v38), drops unused fn_soc_tracking_bundle, and adds tests/docs.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Dusan Vojacek
2026-05-29 00:04:48 +02:00
parent 52e4b68789
commit ba0b55bf10
5 changed files with 432 additions and 58 deletions

View File

@@ -0,0 +1,10 @@
-- Odstraněno v39: kalibrace discharge_calibration_factor nahrazena opravou SoC bilance (jen bd, ne bd+ge_bat).
drop function if exists ems.fn_soc_tracking_bundle(
int,
timestamptz,
numeric,
numeric,
numeric,
numeric
);