Skip to content

Allow a configurable LoadML forecast horizon up to 96 hours #5336

Description

@jacobidsmith

Is your feature request related to a problem? Please describe.
I use a 96-hour planning horizon, but LoadML currently generates only 48 hours of predictions. With LoadML selected as the load source, my plan shows zero load after the ML forecast ends, even though the plan continues for another two days.

I extended the horizon by editing PREDICT_HORIZON in load_predictor.py. This generated 1,152 five-minute predictions covering 96 hours. However, updating to v9.3.3 replaced the modified file and restored the 48-hour limit.

A supported setting would make longer forecasts available without maintaining Python edits after each update.

Describe the solution you'd like
Add a configurable LoadML forecast horizon, for example an Expert Mode setting allowing 48, 72 or 96 hours, with the existing 48-hour default.

Ideally:

The predictor, published forecast entity and charts would support the selected horizon, allowing the plan to use the full forecast.

Extending the horizon would preserve the existing blending behaviour through the first 48 hours. Any additional taper toward the historical forecast could be handled separately.

If the plan extends beyond available ML predictions, Predbat would use a historical fallback for the remaining period rather than assume zero load.

Describe alternatives you've considered
I manually changed the prediction horizon to 96 hours and adjusted the blending calculation to preserve its original behaviour through 48 hours. This worked, but the changes were overwritten during an update.

Reducing the planning horizon to 48 hours would avoid the coverage mismatch, but I would like to retain four-day planning.

Additional context
Running Predbat v9.3.3 as a Home Assistant add-on, with forecast_hours and “Plan forecast hours” set to 96.

Before the update, the modified predictor logged:

Starting autoregressive prediction loop for 1152 steps (96.0 hours)

After the update, it logged:

Starting autoregressive prediction loop for 576 steps (48.0 hours)

The exported forecast contains 576 energy points, and the exported plan shows zero load throughout its remaining approximately 48 hours.

load_ml_energy_forecast_48h_redacted.csv
load_ml_power_forecast_48h_redacted.csv
predbat_horizon_log_excerpts_redacted.txt
predbat_plan_96h_load_excerpt_redacted.html
README.txt

No activity

Activity on this issue will appear here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

BOT_TRIAGEDHas been through the triage botenhancementNew feature or request

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions