Skip to content

Spotový Radar: mark forecast prices as estimate - #36347

Merged
naltatis merged 1 commit into
evcc-io:feat/forecast-estimatefrom
Nemovitosti:tariff-spotovyradar-estimate-feat
Nov 17, 2026
Merged

naltatis merged 1 commit into
evcc-io:feat/forecast-estimatefrom
Nemovitosti:tariff-spotovyradar-estimate-feat

Conversation

@Nemovitosti

Copy link
Copy Markdown
Contributor

Follow-up for #36138. The API returns source: "official" for published OTE/OKTE prices and source: "forecast" for our 72-hour prediction; the template maps the latter to estimate: true. One-line change, no API changes needed.

@github-actions github-actions Bot added the tariffs Specific tariff support label Nov 17, 2026

@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 found 1 issue

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location path="templates/definition/tariff/spotovyradar.yaml" line_range="47" />
<code_context>
       [.points[] | {
         "start": .start,
         "end": .end,
+        "estimate": (.source == "forecast"),
         {{- if eq .price "final" }}
         "value": (.final // .spot)
</code_context>
<issue_to_address>
**Cached forecasts appear confirmed**

When a pre-update Spotový Radar cache is still valid when the service starts, `NewCachedFromConfig` accepts a still-fresh cache created before this mapping was added, and `Rates` serves its entries without fetching new points. Those entries have `Estimate == false`, so forecast prices appear as confirmed until the cache is refreshed.

Invalidate or refresh existing Spotový Radar cache entries when introducing the estimate mapping.
</issue_to_address>

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

@naltatis
naltatis merged commit 32808aa into evcc-io:feat/forecast-estimate Nov 17, 2026
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tariffs Specific tariff support

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants