Skip to content
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

Time zone Atlantic/Canary. The value of the hourly price and the value shown in the graph do not match. #14

Open
carsanch opened this issue Nov 17, 2023 · 1 comment

Comments

@carsanch
Copy link

Hello,

As you can see in the screenshot attached to the issue, the value of the price does not match the one indicated in the graph. It is one hour off. The screenshot was taken at 8:45 a.m. localtime.
screenshot

My time zone is (UTC/GMT +00:00) Atlantic/Canary. Could this be related?

If you need more information, feel free to ask.

Regards.

@azogue
Copy link
Owner

azogue commented Nov 24, 2023

Hi @carsanch

My time zone is (UTC/GMT +00:00) Atlantic/Canary. Could this be related?

Probably 🙈

As it is implemented right now in aiopvpc, the price for 8-9AM in Canary Islands should be 0.13999, and the same for the península (even if 8AM in one place are not 8AM in the other!)

When calling to aiopvpc, the HA timezone is passed, to make these 'offsets' in the prices, which get stored always in UTC internally.

To render the current price, the prices are accessed with the current UTC time.

This way, getting injection prices for 2023-11-17 from different timezones gives the same values once the UTC datetimes are localised again to the current HA timezone.

If you need more information, feel free to ask.

  • What TZ do you have configured in HA?

  • This offset error in the plot is showing ONLY in the custom-lovelace-card, or it appears too in the normal HA history plot for the sensor entity?

If it's an error of the lovelace-card, you missed the repo to report it 😅 It is in https://github.com/danimart1991/pvpc-hourly-pricing-card 😜. Maybe the card has a fixed TZ ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants