OPT-34: the night charge keeps its level when the kept forecast ends #222
@@ -616,11 +616,13 @@ check("B leaves the plan too: the latch is empty, so it is gone and "
|
||||
and lc.plan_targets() is None)
|
||||
latch_step(FC, charging, {A: 80.0})
|
||||
lc.solar_fc = None
|
||||
ia = next(i for i in lc.inverters if i.name == A)
|
||||
ia.soc = 50.0
|
||||
st_below = homeview.plan_state(lc)
|
||||
ia.soc = 80.0
|
||||
st_at = homeview.plan_state(lc)
|
||||
ia = next((i for i in lc.inverters if i.name == A), None)
|
||||
st_below = st_at = None
|
||||
if ia is not None:
|
||||
ia.soc = 50.0
|
||||
st_below = homeview.plan_state(lc)
|
||||
ia.soc = 80.0
|
||||
st_at = homeview.plan_state(lc)
|
||||
check("the screen says the charge goes on only while the latched battery is "
|
||||
f"below its level ({st_below!r} at 50 %, {st_at!r} at 80 %)",
|
||||
st_below == "latched" and st_at == "no_forecast")
|
||||
|
||||
Reference in New Issue
Block a user