Skip to content

Mode: don't activate Smart just from opening the Always charge dropdown - #34264

Merged
naltatis merged 1 commit into
masterfrom
fix/issue-34263
Oct 1, 2026
Merged

naltatis merged 1 commit into
masterfrom
fix/issue-34263

Conversation

@github-actions

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

Copy link
Copy Markdown
Contributor

fixes #34263

Opening the chevron that reveals the "Always charge" dropdown called ensureSmart() on click, which immediately switches the loadpoint to Smart mode (posting to the backend) before the dropdown's toggle can even be touched. Because "Always charge" is a persistent per-loadpoint setting that survives mode switches, this re-activates charging with whatever value was left over from a previous session — e.g. sending an unwanted wakeup — before the user gets a chance to turn it off.

This moves the ensureSmart() call out of the chevron's click handler and into the dropdown's own toggle handler (updateAlwaysCharge), so opening the dropdown only lets you inspect/change "Always charge"; switching to Smart now only happens when you actually interact with the toggle.

🤖 Generated with Claude Code

Opening the chevron dropdown immediately switched the loadpoint to
Smart mode with whatever Always charge value was left over from a
previous session, before the user could change it. Move the Smart
activation into the dropdown's toggle handler instead, so it only
triggers on an actual change.

@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 assessment

Approved.


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

@naltatis

naltatis commented Oct 1, 2026

Copy link
Copy Markdown
Member

Good fix! Now Smart is activated when changing a setting inside the dropdown but now as soon as opening it.

@naltatis
naltatis enabled auto-merge (squash) October 1, 2026 06:32
@naltatis
naltatis merged commit 551d98c into master Oct 1, 2026
14 checks passed
@naltatis
naltatis deleted the fix/issue-34263 branch October 1, 2026 06:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Opening Smart options while charging is Off activates Smart before “Always charge” can be disabled

1 participant