Skip to content

Commit

Permalink
Rounds SG value on Arilock
Browse files Browse the repository at this point in the history
  • Loading branch information
JohNan committed May 11, 2020
1 parent 4eab1ea commit cfc474e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion pyplaato/models/airlock.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def __init__(self, attrs):
self.volume_unit = attrs.get(self.Pins.VOLUME_UNIT, None)
self.bubbles = attrs.get(self.Pins.BUBBLES, None)
self.batch_volume = attrs.get(self.Pins.BATCH_VOLUME, None)
self.sg = attrs.get(self.Pins.SG, None)
self.__sg = attrs.get(self.Pins.SG, None)
self.og = attrs.get(self.Pins.OG, None)
self.__abv = attrs.get(self.Pins.ABV, None)
self.__co2_volume = attrs.get(self.Pins.CO2_VOLUME, None)
Expand All @@ -37,6 +37,11 @@ def abv(self):
if self.__abv is not None:
return round(float(self.__abv), 2)

@property
def sg(self):
if self.__sg is not None:
return round(float(self.__sg), 3)

@property
def co2_volume(self):
if self.__co2_volume is not None:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setuptools.setup(
name="pyplaato",
version="0.0.12",
version="0.0.13",
author="JohNan",
author_email="[email protected]",
description="Asynchronous Python client for getting Plaato Airlock and Keg data",
Expand Down

0 comments on commit cfc474e

Please sign in to comment.