Skip to content

Multiple fixes to issues I have seen in my debug logs.#244

Merged
kvanbiesen merged 2 commits intokvanbiesen:mainfrom
renaudallard:main
Feb 14, 2026
Merged

Multiple fixes to issues I have seen in my debug logs.#244
kvanbiesen merged 2 commits intokvanbiesen:mainfrom
renaudallard:main

Conversation

@renaudallard
Copy link
Copy Markdown
Contributor

@renaudallard renaudallard commented Feb 14, 2026

Each commit has comments describing it. Those fixes are for real problems spotted in my logs.

When GPS was stale and a burst arrived with door unlock plus GPS at a
new location, update_location() ignored the door state and entered
driving mode. The car was actually parked at the destination. Fix:
check _door_unlocked_at in the escape branch — if doors transitioned
locked to unlocked, relocate the park anchor without driving mode.

Also wire MotionDetector.set_charging() in the coordinator so the
charging override in is_moving() actually works (was dead code).
Uncapped extrapolation in get_predicted_soc() inflated prediction
during long MQTT gaps (53 min observed), then the never-decrease
constraint locked in the inflated value. accumulate_energy() already
caps at MAX_ENERGY_GAP_SECONDS (600s) but get_predicted_soc() did
not, creating a mismatch that caused visible prediction plateaus.

Trace: MQTT burst 10:33-10:35, 53-min gap, extrapolation inflated
51.4%->58.7%, real energy stuck at 0.307 kWh, plateau until
re-anchor. After HA restart, 74-min gap from persisted session
inflated to 61.5%, second plateau at 61.7% until API sync-up at 62%.
@renaudallard renaudallard changed the title Fix ghost trip from stale GPS catch-up and wire set_charging Multiple fixes to issues I have seen in my debug logs. Feb 14, 2026
@kvanbiesen kvanbiesen merged commit e90abe1 into kvanbiesen:main Feb 14, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants