diff --git a/lib/plugins/openaps.js b/lib/plugins/openaps.js index 81e7bc25a05..bbce600585d 100644 --- a/lib/plugins/openaps.js +++ b/lib/plugins/openaps.js @@ -478,9 +478,15 @@ function init (ctx) { if ('enacted' === prop.status.code) { var canceled = prop.lastEnacted.rate === 0 && prop.lastEnacted.duration === 0; + var bg = prop.lastEnacted.bg; + var units = sbx.data.profile.getUnits(); + + if (units === 'mmol') { + bg = Math.round(bg / consts.MMOL_TO_MGDL * 10) / 10; + } var valueParts = [ - valueString('BG: ', prop.lastEnacted.bg) + valueString('BG: ', bg) , ', Temp Basal' + (canceled ? ' Canceled' : ' Started') + '' , canceled ? '' : ' ' + prop.lastEnacted.rate.toFixed(2) + ' for ' + prop.lastEnacted.duration + 'm' , valueString(', ', prop.lastEnacted.reason)