Skip to content

Load remaining today mismatch with plan #2307

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
nbullus opened this issue Apr 29, 2025 · 5 comments
Open

Load remaining today mismatch with plan #2307

nbullus opened this issue Apr 29, 2025 · 5 comments
Assignees

Comments

@nbullus
Copy link

nbullus commented Apr 29, 2025

Describe the bug
I could not see a Predbat 'remaining load today' sensor/attribute available so have created my own template sensor. Unfortunately it fails to tally with the Predbat load remaining in the plan.

Both of the following Predbat sensors have a useful 'today' attribute indicating total load today (assumed to be actual load so far + remaining prediction):

predbat.best_load_energy
predbat_load_energy

Both sensors have the same value in the 'today' attribute of 15.172 :

Image

When I subtract the GE house energy used today (8.8 kWh) from the above attribute (15.172 kWh) it leaves a bigger value (6.37 kWh) than what load is left remaining in the plan (5.79 kWh):

Image

Expected behaviour

'total predicted load energy today' - 'load energy used so far' = 'remaining load in plan for today'

Predbat version

8.19.1

Environment details

  • GE AIO
  • Standard HAOS

Screenshots

See above

Log file

Debug file below

Predbat debug yaml file

predbat_debug_17_00_00.yaml.txt

@gcoan
Copy link
Collaborator

gcoan commented Apr 29, 2025

RTFM

https://springfall2008.github.io/batpred/output-data/#baseline-data

"NB: All of Predbat's forecasts are from midnight today to the forecast_hours duration (set in apps.yaml) into the future and shouldn't be confused with 'today' figures.

e.g. predbat.pv_energy is the actual PV energy from midnight today, and for the predicted forecast_hours (typically 48) ahead so will be much larger than sensor.solcast_pv_forecast_today which is today's Solcast PV forecast."

@nbullus
Copy link
Author

nbullus commented Apr 29, 2025

RTFM

https://springfall2008.github.io/batpred/output-data/#baseline-data

"NB: All of Predbat's forecasts are from midnight today to the forecast_hours duration (set in apps.yaml) into the future and shouldn't be confused with 'today' figures.

e.g. predbat.pv_energy is the actual PV energy from midnight today, and for the predicted forecast_hours (typically 48) ahead so will be much larger than sensor.solcast_pv_forecast_today which is today's Solcast PV forecast."

My forecast_hours is also 48 and the sensor does show it going 48 hours, but the 'today' attribute should filter this forecast down to today only (00:00-00:00). The 'today' attribute of the two aforementioned sensors does not span 48 hours otherwise the load value would be way higher than 15.172 kWh.

@gcoan
Copy link
Collaborator

gcoan commented Apr 30, 2025

OK, sorry, I didn't see the bit about attribute you were reading

The difference is almost certainly due to your load scaling.

Predbat calculates a load and a load 10 value, and uses these in calculating the remaining load today.

What you are looking at in the plan is just the load value. If you turn html debug on you will see the load 10 values as well, and the sum of those should be the load remaining today.

@nbullus
Copy link
Author

nbullus commented Apr 30, 2025

OK, sorry, I didn't see the bit about attribute you were reading

The difference is almost certainly due to your load scaling.

Predbat calculates a load and a load 10 value, and uses these in calculating the remaining load today.

What you are looking at in the plan is just the load value. If you turn html debug on you will see the load 10 values as well, and the sum of those should be the load remaining today.

Hi Geoff. I thought this might be the answer, but it still doesn't balance even if you include the 'load scaling PV10' (mine is standard 1.1 setting). If I add 10% onto the standard plan values it is still out by 0.26-0.61 kWh already today:

Plan Today = 15.125 kWh
Actual Load = 6.1 kWh
Plan Remaining = 8.74 kWh
Plan Remaining (10%) = 9.61 kWh

Plan Today minus Actual Load = 9.02 kWh which matches neither the Plan Remaining or if 10% value included

@nbullus
Copy link
Author

nbullus commented May 2, 2025

Think this is a bug.

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

No branches or pull requests

3 participants