Skip to content

fix(extractors): suppress SoC kWh warning spam for non-EV vehicles#460

Merged
nanomad merged 1 commit into
developfrom
fix/extract-soc-kwh-warning-spam
Jun 24, 2026
Merged

fix(extractors): suppress SoC kWh warning spam for non-EV vehicles#460
nanomad merged 1 commit into
developfrom
fix/extract-soc-kwh-warning-spam

Conversation

@nanomad

@nanomad nanomad commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Summary

  • extract_soc_kwh now returns None silently when charge_status is None
  • Non-EV vehicles (e.g., ZP22 series) pass charge_status=None on every poll, causing a spurious WARNING: Could not extract a valid SoC kWh on every cycle
  • The WARNING is preserved for EVs where charge status is present but kWh derivation genuinely fails

Test plan

  • 293 existing tests still pass (poetry run pytest tests --cov)
  • mypy clean
  • Manual: non-EV vehicle no longer emits SoC kWh WARNING on each poll

extract_soc_kwh now returns None silently when charge_status is None,
which is the expected state for non-EV vehicles on every poll cycle.
The WARNING is preserved for EVs where charge_status is present but
kWh derivation fails.
@nanomad nanomad merged commit d202027 into develop Jun 24, 2026
6 checks passed
@nanomad nanomad deleted the fix/extract-soc-kwh-warning-spam branch June 24, 2026 21:14
@nanomad nanomad mentioned this pull request Jun 24, 2026
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.

1 participant