From cf2f412c28a4bd68876cb7b09fef18adb61b60c6 Mon Sep 17 00:00:00 2001 From: bjornoleh <63544115+bjornoleh@users.noreply.github.com> Date: Mon, 21 Aug 2023 10:46:00 +0200 Subject: [PATCH] Fix to display historic COB-value (from OpenAps) when scolling back in time Copied from https://github.com/nightscout/cgm-remote-monitor/commit/7aa606ddac735fce821119e5bb674c08bc8441f0 --- lib/plugins/cob.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/plugins/cob.js b/lib/plugins/cob.js index a75de32f9f8..29cddab3a7d 100644 --- a/lib/plugins/cob.js +++ b/lib/plugins/cob.js @@ -282,9 +282,10 @@ function init (ctx) { var when = new Date(lastCarbs.mills).toLocaleString(); var amount = lastCarbs.carbs + 'g'; info.push({ label: translate('Last Carbs'), value: amount + ' @ ' + when }); + displayCob = Math.round(sbx.properties.openaps.lastSuggested.COB); } - sbx.pluginBase.updatePillText(sbx, { + sbx.pluginBase.updatePillText(cob, { value: displayCob + 'g' , label: translate('COB') , info: info