Skip to content

fix: accept forecast arrays in widget decoder - #225

Merged
naltatis merged 5 commits into
mainfrom
widget-unix-timestamps
Aug 3, 2026
Merged

fix: accept forecast arrays in widget decoder#225
naltatis merged 5 commits into
mainfrom
widget-unix-timestamps

Conversation

@naltatis

@naltatis naltatis commented Jul 13, 2026

Copy link
Copy Markdown
Member

pairs with evcc-io/evcc#32391, replaces the format from evcc-io/evcc#31765

evcc is switching the forecast payload from {start, end, value} objects with RFC3339 strings to [start, end, value] arrays with unix seconds, and the solar timeseries from {ts, val} to [ts, val]. The widget decoder now accepts both, so widgets keep working across old and new evcc versions.

  • ForecastSlot and SolarPoint decode from an unkeyed container first, falling back to the keyed object form
  • the date decoding strategy still accepts RFC3339 strings and unix seconds, covering the object form from either evcc version

🤖 Generated with Claude Code

@andig andig changed the title fix: accept unix timestamps in widget forecast dates fix: accept forecast arrays in widget decoder Aug 1, 2026
@andig

andig commented Aug 1, 2026

Copy link
Copy Markdown
Member

@naltatis can we merge this? Should support both formats.

@naltatis

naltatis commented Aug 3, 2026

Copy link
Copy Markdown
Member Author

Verified both versions working on iOS devices.

@andig

andig commented Aug 3, 2026

Copy link
Copy Markdown
Member

Why is this even relevant for the app? Because it displays the forecast in its widget?

@naltatis

naltatis commented Aug 3, 2026

Copy link
Copy Markdown
Member Author

Yes. The widgets call the API directly. You cant run a browser there. Widget-runtime is quite restricted.

@naltatis
naltatis merged commit bc094be into main Aug 3, 2026
12 checks passed
@naltatis
naltatis deleted the widget-unix-timestamps branch August 3, 2026 08:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request ios iOS specific issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants