Skip to content

Commit

Permalink
fix: added pressure and sector codes while connected to app (#31)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lash-L authored Jan 8, 2023
1 parent 8350511 commit 9cff663
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
12 changes: 9 additions & 3 deletions src/oralb_ble/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,18 +150,23 @@ class ModelDescription:

PRESSURE = {
0: "normal",
16: "normal",
32: "normal",
48: "normal",
50: "normal",
56: "power button pressed",
80: "normal",
82: "normal",
90: "power button pressed",
86: "button pressed",
56: "power button pressed",
90: "power button pressed",
114: "normal",
118: "button pressed",
122: "power button pressed",
178: "high",
144: "high",
146: "high",
150: "button pressed",
154: "power button pressed",
178: "high",
182: "button pressed",
186: "power button pressed",
192: "high",
Expand Down Expand Up @@ -196,6 +201,7 @@ class ModelDescription:
11: "sector 3",
19: "sector 3",
27: "sector 3",
4: "sector 4",
7: "sector 4",
15: "sector 4",
31: "sector 4",
Expand Down
2 changes: 1 addition & 1 deletion tests/test_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -2837,7 +2837,7 @@ def test_genius_8000_high_pressure():
DeviceKey(key="sector", device_id=None): SensorValue(
device_key=DeviceKey(key="sector", device_id=None),
name="Sector",
native_value="unknown sector code " "4",
native_value="sector " "4",
),
DeviceKey(key="time", device_id=None): SensorValue(
device_key=DeviceKey(key="time", device_id=None),
Expand Down

0 comments on commit 9cff663

Please sign in to comment.