seanauff / metermon

Dockerized rtlamr wrapper that outputs formatted JSON messages over mqtt
MIT License
66 stars 12 forks source link

Add a flag for unit division #6

Closed michaelwoods closed 3 years ago

michaelwoods commented 3 years ago

My water meter seems to be reporting the correct number of gallons when comparing to my bill. However the value is divided by 10.0 resulting in hundreds of gal / month rather than thousands.

Adding either a flag or custom multiplier would help solve this issue.

seanauff commented 3 years ago

Hi, I just added this ability! I haven't actually tested it though, so let me know if it works.

michaelwoods commented 3 years ago

Thanks! Though it looks like we need a simple float() conversion. PR'ed: #12

TypeError: unsupported operand type(s) for /: 'int' and 'str'
seanauff commented 3 years ago

Merged your PR, let me know how it goes now!

michaelwoods commented 3 years ago

Working as expected, thanks for your work on this project :+1: