Skip to content

Commit

Permalink
adds support for Big+Quiet co2 sensor
Browse files Browse the repository at this point in the history
  • Loading branch information
dotvezz committed Oct 26, 2023
1 parent 6fc0ac1 commit 0060521
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
5 changes: 5 additions & 0 deletions libdyson/dyson_purifier_big_quiet.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@ def nitrogen_dioxide(self) -> float:
"""Return the index value for nitrogen."""
return self._get_environmental_field_value("noxl", divisor=10)

@property
def carbon_dioxide(self) -> Optional[int]:
"""Return the PPM of carbon dioxide"""
return self._get_environmental_field_value("co2r")

def turn_on(self) -> None:
"""Turn on the device."""
self._set_configuration(fpwr="ON")
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = libdyson-neon
version = 1.2.0
version = 1.3.0
author = The libdyson Working Group
author_email = [email protected]
license = MIT License
Expand Down
2 changes: 2 additions & 0 deletions tests/test_purifier_big_quiet.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ def test_properties(mqtt_client: MockedMQTT):
"noxl": "0011",
"p25r": "0010",
"p10r": "0009",
"co2r": "0400",
"sltm": "OFF",
}
}
Expand All @@ -128,6 +129,7 @@ def test_properties(mqtt_client: MockedMQTT):
assert device.particulate_matter_10 == 5
assert device.volatile_organic_compounds == 0.4
assert device.nitrogen_dioxide == 1.1
assert device.carbon_dioxide == 400


@pytest.mark.parametrize(
Expand Down

0 comments on commit 0060521

Please sign in to comment.