Repository navigation
Conversation
Linked issuesChecked at commit 32808aa #36117 Label the source in the tariff forecast chart for merged tariffs · 0 of 1 met
|
There was a problem hiding this comment.
Hey - I've found 5 issues
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="api/rates.go" line_range="15" />
<code_context>
End time.Time `json:"end"`
Value float64 `json:"value"`
+ // Estimate marks a predicted value that may still be replaced by an actual one
+ Estimate bool `json:"estimate,omitempty"`
}
</code_context>
<issue_to_address>
**Estimated prices lose their marker**
When an estimate-bearing tariff passes through a combined or averaging tariff, `combined.Rates` and the averaging wrapper rebuild rates without copying `Estimate`, so callers see estimated prices as confirmed.
Copy the `Estimate` field when rebuilding rates in both wrappers.
Also at `tariff/merged.go:101`.
</issue_to_address>
### Comment 2
<location path="templates/definition/tariff/demo-dynamic-grid.yaml" line_range="109-114" />
<code_context>
- for (var day = 0; day < 5; day++) {
+ // rolling horizon from the current slot, pattern stays anchored at midnight
+ var end = Math.floor(now.getTime() / slotDuration) * slotDuration + days * slotsPerDay * slotDuration;
+
+ for (var day = 0; day <= days; day++) {
for (var slot = 0; slot < slotsPerDay; slot++) {
var time = new Date(start.getTime() + (day * slotsPerDay + slot) * slotDuration);
+ if (time.getTime() >= end) break;
var hour = slot / slotsPerHour;
</code_context>
<issue_to_address>
**Zero days emits past prices**
When the configurable `days` value is zero, the horizon ends at the current slot, but generation starts at local midnight, so the loop emits the elapsed slots from today instead of an empty forecast; the demo tariff then serves prices from before the requested start time.
Require a positive `days` value or start generation at the current slot when calculating the horizon.
</issue_to_address>
### Comment 3
<location path="assets/js/components/Forecast/PriceChart.vue" line_range="117-122" />
<code_context>
- const rows = params.map((s) => ({
- name: showLabels ? labels[s.seriesIndex] : undefined,
+ const showLabels = points.length > 1;
+ const estimate = vThis.$t("forecast.price.estimate");
+ const rows = points.map((s) => ({
+ name: vThis.rowLabel(
+ showLabels ? s.seriesName : undefined,
+ s.data?.estimate ? estimate : undefined
+ ),
values: [vThis.fmtPricePerKWh(s.value[1], vThis.currency, true, true)],
}));
</code_context>
<issue_to_address>
**Name the tariff source**
The issue asks the chart to indicate primary versus secondary, or explicitly name the source. This tooltip labels the value “estimate,” which distinguishes estimates but does not identify the tariff source.
</issue_to_address>
### Comment 4
<location path="assets/js/components/Forecast/PriceChart.vue" line_range="117" />
<code_context>
- const rows = params.map((s) => ({
- name: showLabels ? labels[s.seriesIndex] : undefined,
+ const showLabels = points.length > 1;
+ const estimate = vThis.$t("forecast.price.estimate");
+ const rows = points.map((s) => ({
+ name: vThis.rowLabel(
</code_context>
<issue_to_address>
**Estimate label lacks agreed terminology**
When the new estimate label is added, the tooltip introduces “estimate” as a named distinction, but the glossary has no term for it, leaving translators without agreed wording for this new UI concept.
Add the estimate concept and its agreed language mappings to the glossary.
</issue_to_address>
### Comment 5
<location path="assets/js/components/Forecast/PriceChart.vue" line_range="164" />
<code_context>
},
},
methods: {
+ rowLabel(name?: string, hint?: string): string | undefined {
+ if (name && hint) return `${name} (${hint})`;
+ return name || hint;
</code_context>
<issue_to_address>
**Component method syntax contradicts convention**
When the new `rowLabel` method is added, the new `rowLabel` component method uses method syntax instead of the required `const` arrow-function form, leaving the component out of compliance with the frontend method convention.
Define `rowLabel` as a `const` arrow function and reference it from the component methods.
</issue_to_address>|
This is really nice, but do we need this? Are forecast is a forecast anyway an don't have no notion of "committed" prices in other tariffs either. |
Yes, we need to decide on this. Especially for merged tariffs (epex + predictor) this is useful. But it's also quite advanced. See #35505 (reply in thread)
Technically yes, but the epex+predict use case has different certainties for data points. So I understand the urge #36117 to visualize this. |
|
@andig removed the merged tariff special handling and secondary=estimate assumption and moved the estimate=true field to the tariff slot source. Tariffs seem to have this guaranteed/estimate data available are listed as followup todos above. |
|
the box can be ticked: it’s live in the API that both energypriceforecast and stroomprijsprognose call (/api/v1/evcc/tariff), so no template change is needed for either. Published day-ahead slots have no field, and every forecast slot has "estimate": true (all slots with mode=forecast_only). Example from ?country=NL&type=grid¤cy=EUR&hours=48 right now: {"start":"2026-11-17T22:45:00Z","end":"2026-11-17T23:00:00Z","value":0.11497}, |
|
raised #36336 into this branch for Amber |
Co-authored-by: Peter Timko <ptimko@cts-group.local>
| s.data?.estimate ? estimate : undefined | ||
| ), |
There was a problem hiding this comment.
🟠 High · Merged source not identified
The tooltip adds an “estimate” hint for flagged prices, but does not show whether the primary or secondary merged tariff supplied the price or name that source. The EPEX predictor used in the reported scenario is not marked in this change, so its prices will not receive that hint here.
Prompt for AI agents
In `assets/js/components/Forecast/PriceChart.vue` at lines 121-122:
**Merged source not identified**
The tooltip adds an “estimate” hint for flagged prices, but does not show whether the primary or secondary merged tariff supplied the price or name that source. The EPEX predictor used in the reported scenario is not marked in this change, so its prices will not receive that hint here.From #36117:
Indicate whether a merged tariff price came from the primary or secondary source, or explicitly name the source.|
OT @RenatusRo just stumbled across |
|
@andig quick clarification first: I'm the developer of energypriceforecast.eu. @RenatusRo brought our forecast to evcc with the first integration, and a few months ago we agreed that I take over everything from here, so please ping my evcc account @hendriksoppa-droid for the On the averaging: yes, it's intended (#34486, reviewed by @naltatis), and it's only active when the user enables evcc's standard "Average by hour" option. In that case the template skips evcc's local |
fixes #36117, refs #35505, #35208
The price chart on the Forecast page now shows which prices are confirmed and which are only an estimate. The tariff source sets the marker per price.
[ { "start": "2026-11-16T12:00:00Z", "end": "2026-11-16T12:15:00Z", "value": 0.21 }, { "start": "2026-11-17T23:00:00Z", "end": "2026-11-17T23:15:00Z", "value": 0.24, + "estimate": true } ]The first price is published by the market (e.g. EPEX) and final. The second is a prediction that can still change. Price tariffs only, display only: planning treats both the same.
mergedpasses it through1:[start, end, value, 1]daysandknowndaysoptionsFollow-ups (tariffs that deliver predicted prices, separate PRs)
stekker: forecast prices are marked (@djfanatix)elpriser: maptype: forecasttoestimate(@x2q)epex-predictor: mark slots afterknownUntil(@t0mas)energypriceforecast,stroomprijsprognose: API sendsestimate, no template change (@RenatusRo, @hendriksoppa-droid)spotovyradar: mark the 72-hour forecast (@Nemovitosti)voltcast: all prices are predictions (@ossedk)energyforecast: mapprice_origin: forecasttoestimate(@andig)amber: markForecastIntervalprices (@ross-w)Screenshots
🤖 Generated with Claude Code