fix rezani pv a
Some checks failed
CI and deploy / migration-check (push) Failing after 10s
CI and deploy / deploy (push) Has been skipped

This commit is contained in:
Dusan Vojacek
2026-05-01 13:12:21 +02:00
parent e54eb1dfd9
commit bf3b10ca50
3 changed files with 31 additions and 0 deletions

View File

@@ -98,6 +98,22 @@ class BuildSetpointsReg340Tests(unittest.TestCase):
assert sp is not None
self.assertIsNone(sp.pv_a_allowed_w)
def test_neg_buy_and_sell_with_pv_b_forces_pv_a_off(self) -> None:
sp = _build_setpoints(
_auto_mode(),
_pi_base(
effective_buy_price=-3.0,
effective_sell_price=-2.0,
pv_b_forecast_solver_w=5000,
pv_a_forecast_solver_w=0,
pv_a_curtailed_w=0,
),
pv_a_cap_w=3333,
inverter_manufacturer="Deye",
)
assert sp is not None
self.assertEqual(sp.pv_a_allowed_w, 0)
class Reg340VerifyPolicyTests(unittest.TestCase):
def test_reg340_not_critical_for_self_sustain(self) -> None: