Skip to content

Commit cfc474e

Browse files
committed
Rounds SG value on Arilock
1 parent 4eab1ea commit cfc474e

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

pyplaato/models/airlock.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def __init__(self, attrs):
1616
self.volume_unit = attrs.get(self.Pins.VOLUME_UNIT, None)
1717
self.bubbles = attrs.get(self.Pins.BUBBLES, None)
1818
self.batch_volume = attrs.get(self.Pins.BATCH_VOLUME, None)
19-
self.sg = attrs.get(self.Pins.SG, None)
19+
self.__sg = attrs.get(self.Pins.SG, None)
2020
self.og = attrs.get(self.Pins.OG, None)
2121
self.__abv = attrs.get(self.Pins.ABV, None)
2222
self.__co2_volume = attrs.get(self.Pins.CO2_VOLUME, None)
@@ -37,6 +37,11 @@ def abv(self):
3737
if self.__abv is not None:
3838
return round(float(self.__abv), 2)
3939

40+
@property
41+
def sg(self):
42+
if self.__sg is not None:
43+
return round(float(self.__sg), 3)
44+
4045
@property
4146
def co2_volume(self):
4247
if self.__co2_volume is not None:

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
setuptools.setup(
77
name="pyplaato",
8-
version="0.0.12",
8+
version="0.0.13",
99
author="JohNan",
1010
author_email="johan.nanzen@gmail.com",
1111
description="Asynchronous Python client for getting Plaato Airlock and Keg data",

0 commit comments

Comments
 (0)