You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(plan): widen forecast_minutes before building yesterday_load_step/yesterday_pv_step
calculate_yesterday() built these step-data dicts via step_data_history()
while self.forecast_minutes was still the live plan's normal horizon.
step_data_history() only fills offsets up to forecast_minutes + plan_interval_minutes,
but the web plan "History" tab needs a full yesterday (24h) plus today-so-far
up to minutes_now - so any offset past the live horizon silently read back
as zero Load/PV for the rest of the day (reproduced live: forecast_plan_hours=30,
Load kWh read 0 from ~06:00 onward every day, self-healing the next day).
The widening fix already existed later in the function, just applied too
late - after the step-data dicts were already built too small.
Fixes#4418
print("ERROR: forecast_minutes was only {} at the first step_data_history call, needed >= {} ""(yesterday_load_step/yesterday_pv_step built before widening)".format(forecast_minutes_snapshots[0], required_minutes))
0 commit comments