[UPDATE] ENTSOE Api delivering duplicate price data, binding works correctly

Dear all,

sometimes I discover that the ENTSOE binding does not deliver tomorrows prices although other sources such as Tibber or Awattar already show them. Today this happened again and I had a closer look at the response. Long story short: Asking for the prices for today and tomorrow entsoe returns three sections: Two for today (with different prices!!!) and one for tomorrow. Find the response attached. The request was:

https://web-api.tp.entsoe.eu/api?securityToken=xxxxx-xxxxx-xxxxx&documentType=A44&in_domain=10Y1001A1001A82H&out_domain=10Y1001A1001A82H&periodStart=202610222200&periodEnd=202610242200

The binding stores the prices in a treemap with two entries, but then only takes the first one. I did not understand the logic behind this so for now I did not yet try to modify the logic to better handle this response. @weymann: Do you have an idea?

entsoe.xml (41.7 KB)

entsoe-treemap.txt (8.3 KB)

According to classification Sequence for germany · Issue #272 · JaccoR/hass-entso-e · GitHub the binding correctly delivers the results of sequence 1. So in yesterday’s case the binding worked correctly, but EntsoE was somehow late in providing the data.

Yes, the correct sequence was and is selected. We discussed this in entsoe thread also a while ago.

This is true. From the pure response two sequences are delivered in the xml whitout any hint of the source. So there’s room for improvement! I needed to ask entsoe support to find out.
Also from stability point of view we’ve findings from time to time - also room for stability imrprovement.

For the stability point, a useful safeguard would be to validate a new price set before it replaces the old one, checking that it covers the full expected day with no gaps or duplicate hours. If a conflicting or incomplete set arrives, keeping the last complete set as a fallback would stop tomorrow’s prices from disappearing on a single bad response. Logging which sequence was chosen, and why, would also make the next duplicate much easier to diagnose without having to ask the provider again.

Is your safeguard a general proposal or based on observed problems?