JaccoR / hass-entso-e

Integration for Home Assistant to fetch day ahead energy prices from European countries via ENTSO-e Transparency Platform
159 stars 25 forks source link

incorrect lowest price time of day #96

Open Mariusthvdb opened 1 year ago

Mariusthvdb commented 1 year ago

with the fixed PR in the timestamp for these sensors, this is revealed (today is dec 20th)

Scherm­afbeelding 2022-12-20 om 10 37 27

while it should really be like

Scherm­afbeelding 2022-12-20 om 10 37 33

note the timestamp is indeed 1 day off:

Scherm­afbeelding 2022-12-20 om 10 36 54

instead of

Scherm­afbeelding 2022-12-20 om 10 37 16

the correct timestamp is ,made by the custom intergration by @klaasnicolaas for the EnergyZero data

see:

Scherm­afbeelding 2022-12-20 om 10 40 26
sfstar commented 1 year ago

In what mode of calculation are you running with the integration? And to double check: the timestamp format is now ok?

Mariusthvdb commented 1 year ago

dont think I understand what you are asking about the mode of calculation.

(timestamp seems to be ok, that is, it is showing in the frontend correctly. only a day off ;-)

see this:

Scherm­afbeelding 2022-12-21 om 10 57 35

it just doesnt check todays prices and seems to go back a full day.

which is remarkable, because when I select 48 hours, these are not ready yet, and only todays prices are available:

Scherm­afbeelding 2022-12-21 om 10 57 51
sfstar commented 1 year ago

@Mariusthvdb you can find the selected calculation method in the options menu that you can access via the configure button on the entsoe integration. Should look like this:

Screenshot 2022-12-23 at 18 46 21

Based on your selected method this could be related to #77 and #98

JaccoR commented 1 year ago

I am in publish and i am having the same problem. Would choosing another calculation method fix this? The calculation method introduced some difficulties. I think #99 also has something to do with it.

klaasnicolaas commented 1 year ago

The hourprices list you get in the _filter_calculated_hourprices function, does it consist of data from multiple days?

JaccoR commented 1 year ago

Highest price is also incorrect and therefore the percentage is also incorrect.

lfdmn commented 1 year ago

The hourprices list you get in the _filter_calculated_hourprices function, does it consist of data from multiple days?

If I understand the code correctly, if self.calculation_mode == CALCULATION_MODE["publish"] it'll return data for 72h or 48h which makes these guys incorrect if you expect the values to be for the current day?

            "min_price": self.get_min_price(filtered_hourprices),
            "max_price": self.get_max_price(filtered_hourprices),
            "avg_price": self.get_avg_price(filtered_hourprices),
            "time_min": self.get_min_time(filtered_hourprices),
            "time_max": self.get_max_time(filtered_hourprices),

Or is this on purpose?

martin3000 commented 9 months ago

I'm in publish mode and the "sensor.entsoe_highest_energy_price_today" is showing a price for tomorrow. Also, sensor.entsoe_time_of_highest_price_today is for tomorrow.