openems icon indicating copy to clipboard operation
openems copied to clipboard

Refactor TouEntsoeImpl for Belgium

Open Sn0w3y opened this issue 1 year ago • 1 comments

Summary of Changes

This pull request introduces a fix to the TouEntsoeImpl class in the io.openems.edge.timeofusetariff.entsoe package. The changes are specifically aimed at resolving the issue where the ENTSO-E API is not returning any values for Belgium when using the PT60M resolution.

Key Improvements

  1. Fallback to PT15M Resolution:

    • Added logic to attempt a fallback to the PT15M resolution if the primary query for PT60M fails. This ensures that pricing data can still be retrieved when PT60M is unavailable.
    • Improved error handling and logging to provide clear visibility into the fallback process.
  2. Error Logging:

    • Enhanced logging to capture exceptions that occur during the retrieval of pricing data. This includes detailed logs for both PT60M and PT15M queries, allowing for easier debugging and tracking of issues.

Impact

These changes address the specific issue reported in #2830 by providing a robust mechanism to handle cases where the PT60M resolution is no longer available. This will improve the user experience for those configuring TimeOfUse Tariffs in Belgium and ensure that data can still be accessed.

Related Issues

  • Fixes #2830: Entso-e tariffs for Belgium not loaded - No data for resolution: PT60M.

Sn0w3y avatar Oct 13 '24 16:10 Sn0w3y

Codecov Report

Attention: Patch coverage is 75.80645% with 15 lines in your changes missing coverage. Please review.

Additional details and impacted files
@@              Coverage Diff              @@
##             develop    #2839      +/-   ##
=============================================
+ Coverage      56.55%   56.66%   +0.12%     
- Complexity      8888     8926      +38     
=============================================
  Files           2167     2167              
  Lines          91918    91959      +41     
  Branches        6834     6831       -3     
=============================================
+ Hits           51973    52101     +128     
+ Misses         38086    37982     -104     
- Partials        1859     1876      +17     

codecov[bot] avatar Oct 13 '24 16:10 codecov[bot]

@Sn0w3y: I hijacked your PR and backported some changes I have recently been applying for ENTSO-E for FEMS.

sfeilmeier avatar Oct 25 '24 14:10 sfeilmeier

@Sn0w3y: I hijacked your PR and backported some changes I have recently been applying for ENTSO-E for FEMS.

haha, no Problem ! :)

Sn0w3y avatar Oct 25 '24 16:10 Sn0w3y