Skip to content

Conversation

@mjliedtke
Copy link

Add pump battery level option to Info Display and Alarms:

  • Info Display settings now provide an option to toggle on Pump Battery to the table
  • Alarm options now include Low Pump Battery

claude and others added 4 commits October 26, 2025 02:32
- Add pumpBattery case to InfoType enum with "Pump Battery" display name
- Add pumpBatteryLevel to Observable shared storage for quick access
- Parse pump.battery.percent from Nightscout API device status
- Display pump battery as percentage in Information Display table
- Keep existing phone battery display unchanged

Follows Nightscout naming conventions and existing code patterns
with minimal changes to the codebase.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
…11CUSK3fJJhZ55exs46iBrg

Add pump battery level to Information Display table
This commit adds a new alarm type that triggers when the pump battery
level drops below a user-configurable threshold. The implementation
follows the existing battery alarm pattern to minimize new code.

Changes:
- Add .pumpBattery case to AlarmType enum
- Create PumpBatteryCondition evaluator following BatteryCondition pattern
- Create PumpBatteryAlarmEditor UI with threshold stepper (0-100%)
- Add latestPumpBattery field to AlarmData
- Update AlarmTask to pass pump battery data from Observable
- Register PumpBatteryCondition in AlarmManager
- Add routing to PumpBatteryAlarmEditor in AlarmEditor
- Set default threshold to 20% with hour-based snooze
- Categorize as device alarm with battery icon and "Pump battery low" description
- Register files in Xcode project build system

The pump battery data is available via Observable.shared.pumpBatteryLevel
from the recent pump battery info display feature. This alarm reuses all
existing alarm infrastructure.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
…UyFC6TU6Rs9Up34HJ7J

Add pump battery alarm with configurable threshold
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