Skip to content

Commit

Permalink
Merge pull request #4 from paulianttila/dev
Browse files Browse the repository at this point in the history
Remove negative 0 for consumption
  • Loading branch information
paulianttila committed Mar 19, 2023
2 parents 4b34e30 + 52d2fde commit 81ad346
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def init(self, callbacks: Callbacks) -> None:
self.logger.debug(f"{self.meter}")

def get_version(self) -> str:
return "2.0.3"
return "2.0.4"

def stop(self) -> None:
def wait_until(condition, interval=0.1, timeout=1, *args):
Expand Down
1 change: 1 addition & 0 deletions src/meter.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,5 +68,6 @@ def _round(self) -> None:
)
self._litre = round(self._litre, 2)
self._instant_consumption_l = round(self._instant_consumption_l, 2)
self._instant_consumption_l += 0.0 # remove possible negative -0.00
self._current_value.value = round(self._current_value.value, 5)
self._previous_value.value = round(self._previous_value.value, 5)

0 comments on commit 81ad346

Please sign in to comment.