Skip to content

feat(widget): support smart mode redesign - #246

Merged
naltatis merged 4 commits into
mainfrom
feat/smart-mode-widget
Aug 16, 2026
Merged

feat(widget): support smart mode redesign#246
naltatis merged 4 commits into
mainfrom
feat/smart-mode-widget

Conversation

@naltatis

@naltatis naltatis commented Aug 4, 2026

Copy link
Copy Markdown
Member

pairs with evcc-io/evcc#32490

Updates the iOS widget for the smart-mode redesign while staying compatible with older servers. New servers are detected by the presence of loadpoints[].alwaysCharge in the state — present on every loadpoint on new servers, never sent by old ones.

  • new servers: selector shows Off/Smart/Fast; labels follow the web UI per device class (switch device: On, continuous heat pump: Normal/Boost); API values stay off/smart/now
  • old servers: behavior and labels unchanged (Off/Solar/Min+Solar/Fast) — evcc removed main.mode.pv/minpv from its i18n, so their last Weblate translations are frozen in the widget strings script
  • read-only ∞ indicator next to the Smart label when Always charge is on/once; no toggle in the widget for now
  • write path unchanged: the widget only offers smart on servers that understand it
Bildschirmfoto 2026-08-04 um 15 05 45

@naltatis
naltatis enabled auto-merge (squash) August 14, 2026 09:59
@naltatis
naltatis merged commit 5f9d6c3 into main Aug 16, 2026
36 of 48 checks passed
@naltatis
naltatis deleted the feat/smart-mode-widget branch August 16, 2026 11:49
webalexeu added a commit to webalexeu/evvc-app that referenced this pull request Aug 17, 2026
pairs with evcc-io/evcc#32490 and mirrors targets/widget/Loadpoint.swift's
handling from evcc-io#246, which this branch picked up via a rebase onto
main. Detects smart-mode servers via loadpoints[].alwaysCharge, switching the
selector to off/smart/now (with device-class labels for continuous heat pumps
and switchable devices) while old servers keep off/pv/minpv/now unchanged. A
read-only "∞" marks the Smart chip when Always charge is on/once, no toggle in
the widget yet, matching iOS.

Also fixes a bug the rebase's auto-merge introduced: the frozen pv/minpv
legacy-label loop wrote straight into `strings`, a variable that in this
branch is now built later from an intermediate `translations` map (added here
to share resolved strings between the iOS and Android generators) - it was
referencing `strings` before its declaration.
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