diff --git a/lib/plugins/loop.js b/lib/plugins/loop.js index 9deb85e60be..6521526860c 100644 --- a/lib/plugins/loop.js +++ b/lib/plugins/loop.js @@ -358,16 +358,17 @@ function init (ctx) { if (prop.lastEnacted) { var valueParts = [] - if (prop.lastEnacted.rate === 0 && prop.lastEnacted.duration === 0) { - valueParts.push('Temp Basal Canceled') - } - if (prop.lastEnacted.rate != null) { - valueParts.push('Temp Basal Started') - valueParts.push(' ' + prop.lastEnacted.rate.toFixed(2) + 'U/hour for ' + prop.lastEnacted.duration + 'm') - } if (prop.lastEnacted.bolusVolume) { valueParts.push('Automatic Bolus') valueParts.push(' ' + prop.lastEnacted.bolusVolume + 'U') + if (prop.lastEnacted.rate === 0 && prop.lastEnacted.duration === 0) { + valueParts.push(' (Temp Basal Canceled)') + } + } else if (prop.lastEnacted.rate === 0 && prop.lastEnacted.duration === 0) { + valueParts.push('Temp Basal Canceled') + } else if (prop.lastEnacted.rate != null) { + valueParts.push('Temp Basal Started') + valueParts.push(' ' + prop.lastEnacted.rate.toFixed(2) + 'U/hour for ' + prop.lastEnacted.duration + 'm') } valueParts.push(valueString(', ', prop.lastEnacted.reason))