- Smart discharge power pacing: discharge rate is calculated to reach
min_socat the end of the window, recalculated every 5 minutes — mirrors smart charge behaviour. House load assists discharge (subtracted from required power). User-specifiedpoweracts as a ceiling; pacing still operates below it. Requiresbattery_capacity_kwhin options; falls back to max power without it. - Feed-in aware discharge pacing: when
feedin_energy_limit_kwhis set, pacing caps the target energy so the export budget is spread across the full window — prevents the session from exhausting the feed-in limit early and stopping beforemin_socis reached - Higher-precision energy calculations: use
ResidualEnergy(direct kWh from inverter) instead of integer SoC% × capacity for smart charge/discharge power pacing and deferred start timing — falls back to SoC-based calculation when unavailable - Session identity tokens: callbacks verify they belong to the current session before taking action — prevents stale timers from destroying replacement sessions
- Fix race conditions: move smart session cancellation before any awaits in
force_charge,force_discharge,clear_overrides, andsmart_chargehandlers — prevents old callbacks from racing with schedule changes - Rename "Smart Charge Headroom" to Smart Headroom — now applies to both smart charge and smart discharge
- Smart discharge sessions persist pacing state and recalculate power on recovery