We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b7d245f commit b286a37Copy full SHA for b286a37
src/tilt_ble/parser.py
@@ -61,11 +61,17 @@ def _start_update(self, service_info: BluetoothServiceInfo) -> None:
61
if not changed_manufacturer_data:
62
return
63
64
- temperature = major
65
- specific_gravity = minor / 1000
+ tilt_pro = minor >= 5000
+
66
+ # up the scale rate if a tilt pro
67
+ temp_scalar = 10 if tilt_pro else 1
68
+ grav_scalar = 10000 if tilt_pro else 1000
69
70
+ temperature = major / temp_scalar
71
+ specific_gravity = minor / grav_scalar
72
73
_LOGGER.debug(
- "Tilt %s data: temp=%.2f, gravity=%.2f, power=%.2f",
74
+ "Tilt %s data: temp=%.3f, gravity=%.3f, power=%.2f",
75
color,
76
temperature,
77
specific_gravity,
0 commit comments