Skip to content

fix: align timeseries source with EVCC format - #284

Merged
ohAnd merged 1 commit into
developfrom
fix/timeseries-evcc-format
Aug 25, 2026
Merged

fix: align timeseries source with EVCC format#284
ohAnd merged 1 commit into
developfrom
fix/timeseries-evcc-format

Conversation

@ohAnd

@ohAnd ohAnd commented Aug 25, 2026

Copy link
Copy Markdown
Owner

The unified timeseries source was documented as accepting EVCC's {start, end, value} payload but expected the units EOS Connect uses internally: EUR/Wh for prices and Wh-per-slot for PV. No real source publishes either. Pointing the source at EVCC's own /api/tariff/grid therefore rendered 34660 ct/kWh, and Home Assistant sensors were rejected over a mandatory end field that is never read.

Prices are now read as EUR/kWh and PV as W, matching what EVCC and the common Home Assistant integrations deliver, with value_unit as an escape hatch for anything else. end is derived from the following entry. Parsing stays strict otherwise: one malformed entry rejects the payload, because dropping it would shift every later hourly price a slot early with nothing in the UI to show for it.

Foreign attribute names remain unsupported by design — the adaptation path is a Home Assistant template sensor, and the docs now carry ready-made snippets for the sources reported in the discussion. To make that strictness workable, the documented but missing POST /api/config/test-timeseries endpoint now exists and reports the first slots converted into the unit the schedule shows, so a wrong unit is visible before saving rather than hours later.

BREAKING CHANGE: existing timeseries configurations inherit the new default unit and change meaning. Set value_unit to EUR/Wh resp. Wh to restore the previous behaviour.

Fixes: #214

The unified timeseries source was documented as accepting EVCC's
{start, end, value} payload but expected the units EOS Connect uses
internally: EUR/Wh for prices and Wh-per-slot for PV. No real source
publishes either. Pointing the source at EVCC's own /api/tariff/grid
therefore rendered 34660 ct/kWh, and Home Assistant sensors were
rejected over a mandatory `end` field that is never read.

Prices are now read as EUR/kWh and PV as W, matching what EVCC and the
common Home Assistant integrations deliver, with value_unit as an
escape hatch for anything else. `end` is derived from the following
entry. Parsing stays strict otherwise: one malformed entry rejects the
payload, because dropping it would shift every later hourly price a
slot early with nothing in the UI to show for it.

Foreign attribute names remain unsupported by design — the adaptation
path is a Home Assistant template sensor, and the docs now carry
ready-made snippets for the sources reported in the discussion. To make
that strictness workable, the documented but missing
POST /api/config/test-timeseries endpoint now exists and reports the
first slots converted into the unit the schedule shows, so a wrong unit
is visible before saving rather than hours later.

BREAKING CHANGE: existing timeseries configurations inherit the new
default unit and change meaning. Set value_unit to EUR/Wh resp. Wh to
restore the previous behaviour.

Fixes: #214
Comment thread src/config_web/api.py Dismissed
@ohAnd
ohAnd merged commit 28de273 into develop Aug 25, 2026
10 checks passed
@ohAnd
ohAnd deleted the fix/timeseries-evcc-format branch August 25, 2026 18:24
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.

2 participants