Skip to content

Add an early warning option to the temp target and override end alarms - #721

Merged
marionbarker merged 5 commits into
devfrom
feature/end-alarm-early-warning
Oct 26, 2026
Merged

marionbarker merged 5 commits into
devfrom
feature/end-alarm-early-warning

Conversation

@bjorkert

@bjorkert bjorkert commented Jul 23, 2026 •

Copy link
Copy Markdown
Member

This adds an Early Warning setting to the Temp Target Ended and Override Ended alarms. It can be set from 0 to 30 minutes in steps of 5 and defaults to 0, which keeps the current behavior. With a lead time set, the alarm fires that many minutes before the scheduled end with the title Temp Target Ending Soon or Override Ending Soon, and then fires again as usual when it actually ends. Each firing happens at most once per event, and extending an active temp target or override arms a new warning for the new end time.

Overrides now carry their unclamped scheduled end next to the graph end date, which is capped to the display horizon. Indefinite Loop overrides have no known end and never trigger the early warning. The full screen alarm view shows the early warning title too.

Includes unit tests for both alarm conditions.

Screenshots

Early Warning setting Early warning firing
early-warning-setting ending-soon-alarm

The end alarms can now also fire a chosen number of minutes before the
scheduled end, titled Temp Target Ending Soon or Override Ending Soon,
and still fire normally when the event actually ends. Default is 0 which
keeps the current behavior. Overrides keep their unclamped scheduled end
so indefinite or long overrides do not warn incorrectly. Includes unit
tests for both conditions.
@bjorkert

Copy link
Copy Markdown
Member Author
image

bjorkert added 4 commits July 24, 2026 20:00
…y-warning

# Conflicts:
#	LoopFollow/Controllers/Nightscout/Treatments/Overrides.swift
…y-warning

# Conflicts:
#	Tests/AlarmConditions/Helpers.swift
…y-warning

# Conflicts:
#	LoopFollow/Alarm/Alarm.swift
#	LoopFollow/Controllers/Nightscout/Treatments/Overrides.swift
#	LoopFollow/Helpers/DataStructs.swift

@marionbarker marionbarker left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approve by test.

@marionbarker
marionbarker merged commit 3bf62fc into dev Oct 26, 2026
1 check passed
@marionbarker
marionbarker deleted the feature/end-alarm-early-warning branch October 26, 2026 23:29
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.

2 participants