diff --git a/libdyson/dyson_pure_cool.py b/libdyson/dyson_pure_cool.py index e637a1d..5fbf9f7 100644 --- a/libdyson/dyson_pure_cool.py +++ b/libdyson/dyson_pure_cool.py @@ -63,14 +63,14 @@ def particulate_matter_10(self): return int(self._get_environmental_field_value("pm10")) @property - def volatile_organic_compounds(self): - """Return VOCs in micro grams per cubic meter.""" - return int(self._get_environmental_field_value("va10")) + def volatile_organic_compounds(self) -> float: + """Return the index value for VOC""" + return self._get_environmental_field_value("va10", divisor=10) @property - def nitrogen_dioxide(self): - """Return nitrogen dioxide level in micro grams per cubic meter.""" - return int(self._get_environmental_field_value("noxl")) + def nitrogen_dioxide(self) -> float: + """Return the index value for nitrogen.""" + return self._get_environmental_field_value("noxl", divisor=10) def turn_on(self) -> None: """Turn on the device.""" diff --git a/setup.cfg b/setup.cfg index eeb82d9..37a59eb 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = libdyson-neon -version = 1.0.0 +version = 1.0.1 author = The libdyson Working Group author_email = dotvezz@gmail.com license = MIT License diff --git a/tests/test_pure_cool.py b/tests/test_pure_cool.py index f60e37d..d4cfa26 100644 --- a/tests/test_pure_cool.py +++ b/tests/test_pure_cool.py @@ -151,8 +151,8 @@ def test_properties(mqtt_client: MockedMQTT): device.request_environmental_data() assert device.particulate_matter_2_5 == 9 assert device.particulate_matter_10 == 5 - assert device.volatile_organic_compounds == 4 - assert device.nitrogen_dioxide == 11 + assert device.volatile_organic_compounds == 0.4 + assert device.nitrogen_dioxide == 1.1 @pytest.mark.parametrize(