-
-
Notifications
You must be signed in to change notification settings - Fork 115
Car charging plan empty after v8.34.7 — optimizer finds 0 combinations on hybrid inverter, collapsing import threshold #3697
Description
Describe the bug
After upgrading from v8.34.7 to v8.34.8+, car charging stops working entirely: car_charging_slots is empty, "Car kWh" in the plan shows 0.0, and "Hold for car" never triggers. Downgrading to v8.34.7 with the same config and same energy rates immediately restores everything.
The prediction model changes in the v8.34.7→v8.34.8 diff (new battery_rate_max_charge_dc, calculate_export_on_pv, removal of battery_rate_max_charge_scaled) cause the optimizer to evaluate 0 combinations on my Kostal hybrid inverter setup. This means best_price_charge_level stays at the minimum import rate instead of being set by actual charge window discovery. The import threshold then equals the minimum rate, nothing qualifies as a "low rate" window, and plan_car_charging() receives an empty slot list.
The car charging is collateral damage — the real problem is the optimizer producing no plan at all for this inverter type.
Side-by-side evidence — same config, same rates
| v8.34.7 (working) | v8.34.16 (broken) | |
|---|---|---|
| Import rates | min 31.1, max 242.5 | min 31.1, max 242.5 |
| Rate thresholds | 242.0øre | 242.0øre |
| Optimizer combinations tried | 141 (13.5 sec) | 0 (0.0 sec) |
| best_price_charge_level | 33.4øre | 31.1øre (= min rate) |
| best_cycle | 20.76 kWh | 0 kWh |
| best_import | 0.0 kWh → 1.62 kWh | 0 kWh |
| Import threshold | 223.1øre | 31.1øre |
| Low import rate windows | 46 windows | [] (empty) |
| Car charging slots | 6 slots, ~50 kWh | [] (empty) |
| Hold for car | Works | Never triggers |
Key log lines
v8.34.7 (working)
Optimise levels pass ended, duration 13.5 seconds tried 141 combinations
Set best_price_charge_level 33.4øre, best_price_export_level 80.4øre, best_price_charge 31.1øre
Import threshold used for optimisation was 223.1øre
Low Import rate found rates in range 31.1øre to 238.8øre
Car 0 plan charging from 0.0 to 46.0, with slots [46 slots]
Car 0 charging plan is: [6 charging slots totalling ~50 kWh]
Completed run status Hold for car
v8.34.16 (broken)
Optimise levels pass ended, duration 0.0 seconds tried 0 combinations
Set best_price_charge_level 31.1øre
Import threshold used for optimisation was 31.1øre
No low rate period found
Low import rate windows []
Car 0 plan charging from 0.0 to 46.0, with slots [] from SoC 0.0% to 46.0%, ready by 07:00:00
Completed run status Demand
Root cause
The v8.34.7→v8.34.8 diff (https://github.com/springfall2008/batpred/compare/v8.34.7...v8.34.8) changed prediction.py significantly:
battery_rate_max_charge_scaledremoved, replaced withbattery_rate_max_charge_dc— different semantics- New DC charging model in prediction.py — changes how ECO-mode battery charging from PV is scored for hybrid inverters
calculate_export_on_pvadded (defaults toTrue) — addsmetric_keeppenalty in prediction, changing plan scores
These changes alter how the optimizer evaluates plans for hybrid inverters. On my Kostal hybrid setup (which doesn't set inverter_limit_charge_dc), the optimizer now finds 0 valid combinations. Since the optimizer doesn't run, best_price_charge_level stays at the minimum rate, which becomes the import threshold, which empties low_rates, which gives plan_car_charging() zero slots.
The car plan and "hold for car" are downstream victims — the core issue is the optimizer finding nothing worth doing.
Steps to reproduce
- Use a Kostal hybrid inverter (or likely any hybrid inverter without
inverter_limit_charge_dcset) - Use EnergiDataService or any spot price tariff
- Configure
num_cars: 1withcar_charging_plannedresolving to true - Run v8.34.8 or later — optimizer tries 0 combinations, threshold = min rate, car plan empty
- Downgrade to v8.34.7 — optimizer runs 141 combinations, threshold = 223.1øre, car plan populated, hold for car works
Predbat version
- Broken on: v8.34.8 through v8.34.16 (confirmed)
- Working on: v8.34.7
Environment details
- Inverter: Kostal hybrid (
inverter_hybrid: true, custom template) - Energy rates: EnergiDataService (Danish spot prices, øre/kWh)
- No Octopus Intelligent
- No
inverter_limit_charge_dcset (new setting from v8.34.8) - Car charger has no HA integration — using manual
input_select.car_charger_plugged_inforcar_charging_planned car_charging_plan_smart: false(default)
Key config
num_cars: 1
car_charging_battery_size: 46.0
car_charging_limit: 46.0
car_charging_rate: 11
car_charging_hold: true
car_energy_reported_load: true
car_charging_planned: input_select.car_charger_plugged_in
car_charging_plan_time: 07:00:00
car_charging_plan_smart: false
car_charging_plan_max_price: 80
car_charging_from_battery: false
inverter_hybrid: true
# inverter_limit_charge_dc: NOT SETAttachments
- predbat.log from v8.34.16 (broken) — shows 0 optimizer combinations
- predbat.log from v8.34.7 (working) — shows 141 optimizer combinations, car plan populated
- Screenshots of "Hold for car" notifications working on v8.34.7
- predbat_debug yaml from v8.34.16 run (renamed to .yaml.txt)

