Skip to content

Treat a zero-duration temp basal as ended at its start - #835

Open
bjorkert wants to merge 1 commit into
devfrom
fix/temp-basal-zero-duration
Open

bjorkert wants to merge 1 commit into
devfrom
fix/temp-basal-zero-duration

Conversation

@bjorkert

@bjorkert bjorkert commented Nov 13, 2026 •

Copy link
Copy Markdown
Member

When the newest Temp Basal in Nightscout had a duration of 0, LoopFollow drew it as running for 30 minutes and the Basal row showed scheduled → temp, even though the pump was back on scheduled basal. Trio uploads durations in whole minutes, so a temp cancelled within its first minute (for example when switching to Basal Testing on Trio dev) arrives with duration 0. A duration of 0 now ends the temp at its start; a temp basal without a duration is still drawn as running for 30 minutes.

Tested in the simulator with Trio dev and a simulated Omnipod DASH pod, and checked against Nightscout data from real Loop and Trio setups, where durations are always present and 0 only shows up for a temp cut short by a pod change.

Before and after, same Nightscout data (scheduled 0.8 U/h, a 0.5 U/h temp cancelled within its first minute):

before after

Trio uploads temp basal durations in whole minutes, so a temp cancelled within its first minute arrives with duration 0. Only a temp basal without a duration is drawn as running for 30 minutes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant