-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Todays average prices missing from 23:00 to 24:00 #157
Comments
I now have an example of this effect happening. The results are for Thursday 06-06-2024. The following picture are from 23:15 and show:
Which looks like this in the State inspector: After 24:00 this changes to:
At 01:00 it changes again and becomes 'normal' as intended:
As I'm using the integration as input for the EV Smart Charging integration. It gets confused when scheduling charging of my car around 23:00. |
Just looked at the logic and is seems the issue is still there. Aiming to fix this in the next beta. |
Should be fixed in the latest beta (v0.5.0-beta2) |
v0.5.0 is released. The discussed issues should be solved. Please feel free to open a new issue if you feel this is needed. |
At 23:00 the sensor.average_electricity_price_today has no today's prices, but still has tomorrow's prices. When it becomes 24:00 all prices are correct again.
I suspect that this is caused by timezone / daylight savings time. But still investigating it.
This is what I know now.
My setup:
Core 2024.5.4
Supervisor 2024.05.1
Operating System 12.3
Frontend 20240501.1
hass-entso-e 0.0.1
Timezone: GMT+01:00) Amsterdam
Current date: 24 may 2024, so no daylight savings time at this moment.
Findings:
The sensor.average_electricity_price_today contains the following attributes:
The three price attributes show the issue.
At all times 'prices' contain a list of today's and tomorrow's prices, if available.
Until 23:00 the 'prices_today' contains a list of today's prices. From 23:00 until 24:00 this list becomes empty.
At all times 'prices_tomorrow' contains tomorrow's prices, if available.
In my situation I use the Day Ahead Prices for The Netherlands. The prices for tomorrow are available from ~15:00 today. From that time, the attribute prices_tomorrow is filled. At 24:00 the prices_tomorrow becomes an empty list.
This is all normal behaviour.
At 23:00 when 'prices_today' becomes an empty list, the 'prices' list still contains all prices both today and tomorrow.
I'm not sure what triggers this effect. It could be the hourly timer event used to update the prices from ENTSO-e.
I have tried to determine where this issue could be caused in the source code. But as I'm new to HA, Python, Jinja2 and all other languages used, this is not so easy.
One possible location is in the file coordinator.py which contains:
This seems the only place in the source code where:
The 'strange' thing I see happening here, is:
But my search then ends in a call to EntsoePandasClient in module enstoe. This module I can not find the source code for.
So who could help analyze this behaviour further?
If a solution can be found, I'm willing to learn how to use git, update and publish the code.
The text was updated successfully, but these errors were encountered: