Skip to content

Conversation

@mjliedtke
Copy link

- Add pumpBattery to InfoType enum for Information Display table
- Parse pump battery percentage from Nightscout API (pump.battery.percent)
- Add pumpBatteryLevel observable for alarm data
- Add pumpBattery alarm type with threshold-based triggering
- Create PumpBatteryCondition for alarm evaluation
- Register pump battery alarm in AlarmManager

commit 0d8ae69
Author: Claude <noreply@anthropic.com>
Date:   Fri Jan 2 19:59:18 2026 +0000

    Add pumpBattery case to AlarmSelectionView switch

commit b67fb8b
Author: Claude <noreply@anthropic.com>
Date:   Fri Jan 2 19:55:21 2026 +0000

    Add pumpBattery case to AlarmEditor switch statement

    Reuses BatteryAlarmEditor for pump battery alarm configuration
    since both use threshold-based percentage settings.

commit 89cc3da
Author: Claude <noreply@anthropic.com>
Date:   Fri Jan 2 19:46:56 2026 +0000

    Add pump battery display and alarm feature

    - Add pumpBattery to InfoType enum for Information Display table
    - Parse pump battery percentage from Nightscout API (pump.battery.percent)
    - Add pumpBatteryLevel observable for alarm data
    - Add pumpBattery alarm type with threshold-based triggering
    - Create PumpBatteryCondition for alarm evaluation
    - Register pump battery alarm in AlarmManager
@bjorkert
Copy link
Contributor

bjorkert commented Jan 3, 2026

Thanks for the new PR — it looks good overall.
One suggestion: instead of reusing the same SF Symbol as the looping phone’s low battery (battery.25), it might be better to use something like powermeter to clearly differentiate the two.

For the sound, I think it’s reasonable to reuse the same one (soundFile = .machineCharge).

Reusing the same editor is a clever trick, but I think it deserves a short comment, so anyone changing BatteryAlarmEditor in the future understands that it affects both alarms.

@bjorkert bjorkert requested a review from marionbarker January 3, 2026 10:09
@mjliedtke
Copy link
Author

Great. Thanks for the feedback and that all makes sense.

@mjliedtke
Copy link
Author

@bjorkert I'm actually now wondering if would be better to split the Editor so that the info text makes sense.

@bjorkert
Copy link
Contributor

bjorkert commented Jan 3, 2026

Sounds good!

- Change pump battery icon from battery.25 to powermeter
- Split BatteryAlarmEditor into PhoneBatteryAlarmEditor and PumpBatteryAlarmEditor
- Each editor now has specific text for its respective battery type
* Refactor battery alarm editors and update pump battery icon

- Change pump battery icon from battery.25 to powermeter
- Split BatteryAlarmEditor into PhoneBatteryAlarmEditor and PumpBatteryAlarmEditor
- Each editor now has specific text for its respective battery type
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