batpred icon indicating copy to clipboard operation
batpred copied to clipboard

Import and export block for energy rates

Open gcoan opened this issue 3 months ago • 4 comments

Is your feature request related to a problem? Please describe. Predbat does a brilliant job of optimising the battery use, but sometimes it tries too hard, planning repeated charge and discharge cycles overnight (e.g. on iGo) to maximise the income, but at the expense of extra battery cycles.

Whilst you can give predbat manual overrides for a specific day to change the plan, it would be useful (and simpler for users) to be able to explicitly direct predbat for periods that you don't want import or export.

Describe the solution you'd like Something like the ability to configure a (date), start time and end time when import or export is to be prevented in apps.yaml

e.g.

image

Predbat will then take account of these in the plan.

Describe alternatives you've considered Automations to set a series of force charge/demand/export commands at the required times. Possible but messy.

Additional context Strangely Chat GPT thinks predbat already has this feature. If you ask it how to prevent predbat exporting overnight it suggests using export_block!

gcoan avatar Sep 24 '25 10:09 gcoan

+1 I'm currently playing with export_override, import_override and rate_increment as a workaround. It works for now, however the planned costs go awry...

ragg987 avatar Sep 24 '25 14:09 ragg987

I make use of "switch.predbat_combine_charge_slots" = true to keep the battery doing one during the cheap IOG overnight slot.

Ashpork avatar Oct 04 '25 17:10 Ashpork

I make use of "switch.predbat_combine_charge_slots" = true to keep the battery doing one during the cheap IOG overnight slot.

Thanks for that tip - I had read it twice in the docs but did not get it :grimacing:. Now tried that suggestion, and combined with a small price over-ride I have whay I need. i.e. battery sits with a small charge for the half the cheap window then ramps up to maximum charge in the second half of that window.

Image

ragg987 avatar Oct 06 '25 09:10 ragg987

I don't know if this is a bug, however "switch.predbat_combine_charge_slots" is not consistent in the way it works and I have seen the battery charge and discharge twice during the IOG off-peak period. The majority of the time it has respected it, though. Latest example from History.

Image

ragg987 avatar Oct 15 '25 14:10 ragg987

+1 for this, and to add a reason that using "switch.predbat_combine_charge_slots" = true isn't satisfactory for me: I have a five-hour cheap import window (Octopus Go), but my battery will fill from empty in just two hours. I'd like predbat to pick the lowest-carbon two hours to fill up, rather than always starting at 00:30, so I turn this setting off, but then predbat "pumps" the battery up and down in the night to maximise export, which is clearly just wasteful

peter1rhodes avatar Dec 08 '25 10:12 peter1rhodes