Skip to content

v0.1.2 — Fix: Battery Balancing Cycle Sessions

Choose a tag to compare

@cryptotomte cryptotomte released this 16 Mar 18:45
c5a21a9

Bug fix: Spurious sessions from battery balancing cycles

After a charging session completed, go-e chargers perform battery cell balancing cycles (Complete → Charging → Complete) which were incorrectly recorded as separate charging sessions. A single evening could produce 15–20 spurious sessions of 0.02–0.1 kWh each, polluting session history and statistics.

Fix: The session engine now tracks the previous car state. A direct Complete → Charging transition is recognized as a balancing cycle and suppressed. A new real session still starts correctly after the car goes through Idle or Wait for car.

When debug logging is enabled, suppressed balancing cycles are logged as BALANCING_SKIP entries.

Note: This fix is forward-only. To clear spurious sessions created before updating, delete .storage/ev_charging_manager_sessions and .storage/ev_charging_manager_stats in your HA config directory, then restart Home Assistant. Your configuration (users, vehicles, RFID cards) is unaffected.

Changes

  • session_engine.py: Add _prev_car_status tracking and balancing cycle guard
  • tests/test_session_engine.py: 7 new tests covering all balancing cycle scenarios