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

Next tariff calculation seems wrong #5

Open
mazzy89 opened this issue Sep 30, 2021 · 3 comments
Open

Next tariff calculation seems wrong #5

mazzy89 opened this issue Sep 30, 2021 · 3 comments

Comments

@mazzy89
Copy link
Collaborator

mazzy89 commented Sep 30, 2021

I've noticed an error in the calculation. This screenshot is taken at 22.02 UTC+2

Screenshot 2021-09-30 at 21 59 29

It says that the next tariff is in 1420 minutes which does not make much sense because it should be according to the schedules 00:20/01:00

Screenshot 2021-09-30 at 21 59 39

Screenshot 2021-09-30 at 21 59 44

@mazzy89
Copy link
Collaborator Author

mazzy89 commented Sep 30, 2021

The bug seems that is due to the fact that the calculation is done looking at the tree on the same day. Approaching the end of the day, however, we should make a request to the next page (zitra) and find the right value.

I know that it's not a huge bug because the next day the sensor should pull the right value.

@slesinger
Copy link
Owner

Thanks for reporting the issue. This fix requires major code change. I will keep this issue open.

@mazzy89
Copy link
Collaborator Author

mazzy89 commented Oct 30, 2021

No problem. I'm actively using this custom components. Overall it is working. It's not a big deal for the moment because it happens only at the end of the day.

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