Closed timoschlueter closed 2 years ago
example response:
"glucoseMeasurement": {
"FactoryTimestamp": "1/24/2022 6:43:54 PM",
"Timestamp": "1/24/2022 7:43:54 PM",
"type": 1,
"ValueInMgPerDl": 123,
"TrendArrow": 3,
"TrendMessage": null,
"MeasurementColor": 1,
"GlucoseUnits": 1,
"Value": 123,
"isHigh": false,
"isLow": false
},
Right now, the upload uses the ".Value"-Field from the response object. This is bad, since the value might either be in mmol/L or mg/dL, depending on the users LibreLink setup.
Fortunately, the value also returns an attribute called ".ValueInMgPerDl". This is always mg/dL, no matter what the use has configured. Therefore we should switch to this attribute.