gkreitz / homeassistant-grohe_sense

Grohe Sense integration for Home Assistant
MIT License
42 stars 25 forks source link

Seeing whole lot of decimals in value #16

Open CptMeatmug opened 3 years ago

CptMeatmug commented 3 years ago

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)