mampfes / ha_epex_spot

Adds EPEX Spot data to Home Assistant.
MIT License
117 stars 20 forks source link

smard.de data starts before other integrations #97

Closed aSauerwein closed 6 months ago

aSauerwein commented 6 months ago

I realized that there are some differences on all the data values between the integrations

at 17.01.24 08:00 web scraper: data from 2024-01-17T00:00:00+01:00 till 2024-01-17T23:00:00+01:00 smart energy: data from 2024-01-17T00:00:00+01:00 till 2024-01-17T23:00:00+01:00 smard.de: data from 2024-01-15T00:00:00+01:00 till 2024-01-17T23:00:00+01:00

this leads to issues when you want to draw charts with different colors per day. For example I tried to make a line chart with "orange" for today and "blue" for tomorrow. in the morning "todays data" is at [48:72] but in the afternoon "todays data" is at [24:48]

I'll create a pull request, so that all 3 integrations show the same timeframe of data

mampfes commented 6 months ago

Hi, this is intentional: Some sources (namely EPEX Spot Web Scraper and smartENERGY) do not provide data from yesterday.

So, the question is: Why do we need the data from yesterday? The answer is: Once you want to do automations based on the price within a certain timeframe - especially if the timeframe includes midnight (example: cheapest contiguous interval of 3h between 20:00 and 4:00). You can do such things with the new EPEX Spot Sensor. For sure, data can be cached, so you normally don't need yesterdays data. But in case you restart HA after midnight. If you don't have yesterdays data, you can't continue your automation.

Long story short: Please try to fix this in your visualization. Is there are way to filter out outdated data? Then your are independent of the report time interval.

aSauerwein commented 6 months ago

Hi,

yes I agree, it is great to have data from yesterday.

but i'd assume it should be always the same data: yesterday, today and tomorrow ( if available)

in the current setup we have: from 00:00 till 14:00 we have data from the day before yesterday, yesterday and today and from 14:00 till midnight we have data from yesterday, today and tomorrow.

I also agree that this could be fixed in the visualization, but I also think that the source data should be consistent over the whole day.

aSauerwein commented 6 months ago

https://github.com/mampfes/ha_epex_spot/pull/98

mampfes commented 6 months ago

fixed by #98