oprava exportu bateir do site vecer
Some checks failed
CI and deploy / migration-check (push) Failing after 24s
CI and deploy / deploy (push) Has been skipped

This commit is contained in:
Dusan Vojacek
2026-05-25 12:20:51 +02:00
parent 91af5c76c2
commit 2e27c8c5de
4 changed files with 52 additions and 27 deletions

View File

@@ -2239,18 +2239,19 @@ class ChargeAcquisitionArbitrageTests(unittest.TestCase):
50.0,
operating_mode="AUTO",
)
self.assertEqual(snap["planner_build_tag"], "2026-05-28-evening-peak-full-export-v26")
self.assertEqual(snap["planner_build_tag"], "2026-05-28-evening-peak-full-export-v27")
peak_idx = sells.index(4.04)
peak = results[peak_idx]
self.assertIn(peak.export_mode, ("BATTERY_SELL", "PV_SURPLUS"))
self.assertGreater(abs(peak.grid_setpoint_w), 5000)
# v27: ge_bat=0 jen před prvním push slotem, ne u všech sell < peak0.05.
for i, r in enumerate(results):
if i == peak_idx or sells[i] >= 4.04 - 0.05:
if i >= peak_idx:
continue
self.assertNotEqual(
r.export_mode,
"BATTERY_SELL",
msg=f"slot {i} sell={sells[i]} must not battery-export before peak",
msg=f"slot {i} sell={sells[i]} must not battery-export before first push",
)
def test_evening_battery_export_when_sell_above_acquisition(self) -> None: