Skip to content

Charger (Plugchoice): fix CurrentPower reading 0 for externally started sessions - #32420

Merged
andig merged 1 commit into
masterfrom
fix/issue-32419
Aug 3, 2026
Merged

Charger (Plugchoice): fix CurrentPower reading 0 for externally started sessions#32420
andig merged 1 commit into
masterfrom
fix/issue-32419

Conversation

@github-actions

@github-actions github-actions Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

fixes #32419

CurrentPower() in charger/plugchoice.go returned 0 whenever the private c.enabled field was false, but that field is only set by Enable(). When a charging session is started outside evcc (e.g. an RFID tap routed through OCPP), Enable() is never called, so power reads 0.0 kW even though Currents() (which reads the same power-usage API response without this gate) and the charging session itself work correctly.

This drops the c.enabled check in CurrentPower(), relying on the API's own reported power value, consistent with how Currents() already behaves.

🤖 Generated with Claude Code

…ed sessions

CurrentPower() gated on the private enabled field, which is only set
by Enable(). Sessions started outside evcc (e.g. RFID tap) never call
Enable(), so power stayed 0 despite Currents() and charging working
correctly from the same API response.
@andig andig added the devices Specific device support label Aug 1, 2026
@thiete

thiete commented Aug 3, 2026

Copy link
Copy Markdown

PR builds and deploys fine, and fixes the issue.

@andig
andig marked this pull request as ready for review August 3, 2026 10:09
@andig
andig enabled auto-merge (squash) August 3, 2026 10:10
@andig

andig commented Aug 3, 2026

Copy link
Copy Markdown
Member

/backport

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor Author

❌ pull request #32420 is not merged

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@andig
andig merged commit c7c744f into master Aug 3, 2026
10 checks passed
@andig
andig deleted the fix/issue-32419 branch August 3, 2026 10:14
@andig

andig commented Aug 3, 2026

Copy link
Copy Markdown
Member

/backport

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor Author

❌ pull request #32420 is not labelled bug, only bugfixes are backported

@andig andig added the bug Something isn't working label Aug 3, 2026
@andig

This comment has been minimized.

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor Author

✅ Opened backport pull request on release/0.313.2: #32475

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working devices Specific device support

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Plugchoice: Charge Power reads 0 when session is started outside evcc (RFID/tap, reconnect)

3 participants