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

Seeing whole lot of decimals in value #16

Open
CptMeatmug opened this issue Apr 27, 2021 · 0 comments
Open

Seeing whole lot of decimals in value #16

CptMeatmug opened this issue Apr 27, 2021 · 0 comments

Comments

@CptMeatmug
Copy link

First of all, thanks for your work!
My issue is that I'm experiencing way too many decimals in value, as the image shows:
image
I believe this has something to do with floats, round-off error or such. After several hours of googling, I wasn't able to do the rounding in HA, so I ended up adding round( ) to sensor.py (line 158)
return round(sum((w['waterconsumption'] for w in self._withdrawals if w['starttime'] >= since)),1)

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