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

Data Reversal Issue in Veolia Python API cause bad information in component #45

Open
Jezza34000 opened this issue Dec 29, 2023 · 0 comments

Comments

@Jezza34000
Copy link

Jezza34000 commented Dec 29, 2023

Hi,

In my situation, the data retrieved using _get_daily_consumption from the python-veolia-api appears to be reversed. When I fetch data from the website, I receive:

date;consumption(litre)
26/12/2023;91
25/12/2023;107
24/12/2023;143
...
02/12/2023;140
01/12/2023;171

The corresponding array is:

[91, 107, 143, 73, 107, 114, 173, 92, 83, 220, 180, 165, 236, 88, 82, 122, 105, 142, 217, 158, 86, 111, 72, 108, 140, 171]

In the VeoliaDailyUsageSensor class, you are retrieving data with the last value of the array: state = self.coordinator.data[DAILY][-1]. However, in my case, the last value represents the first consumption day of the month, not the last one.

As a workaround, I am using: state = self.coordinator.data[DAILY][0]

Is this a general behavior who need a PR, or something specific to my account?

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

1 participant