Skip to content

Reaction: Get notified when your AirPods finish charging#611

Merged
d4rken merged 1 commit into
mainfrom
feat/charged-notification
Jun 10, 2026
Merged

Reaction: Get notified when your AirPods finish charging#611
d4rken merged 1 commit into
mainfrom
feat/charged-notification

Conversation

@d4rken

@d4rken d4rken commented Jun 10, 2026

Copy link
Copy Markdown
Member

What changed

  • New optional notification that tells you when your AirPods have finished
    charging, so you know when to unplug them.
  • You can set the target level (50–100%, default 100%) and choose whether it
    watches the pods, the case, or both.
  • The notification clears itself once you pick up or start using the device,
    and won't nag you while you keep one pod in your ear and charge the other.
  • Pro feature, configured per device in the device's Reaction settings.

Technical Context

  • Charging progress is tracked by a per-profile state machine
    (IDLE/CHARGING/FIRED/DISMISSED/SUSPENDED) fed only from live BLE/AAP data —
    cached battery values never start, complete, or end a session, so a stale
    reading can't fire a false notification.
  • A slot that stops charging at/above the threshold counts as "done" rather than
    "unplugged", because the firmware flips the charging flag off once a pod hits
    100%; a slot dropping below the threshold is a genuine unplug and resets the
    session.
  • Brief signal loss (case closed / out of range) suspends the session instead of
    resetting it, so a momentary BLE gap mid-charge doesn't lose progress.
  • Dismissal on "user is handling the device" uses worn-pod state from AAP only —
    BLE ear-detection bits are phantom for pods resting in the case — plus a lid
    change matched against a short rolling window, because the worn-pod/in-case
    advertisement pair makes the lid alternate OPEN/NOT_IN_CASE every frame and a
    single-frame baseline would dismiss itself.
  • Scope is normalized to pods-only on case-less models (AirPods Max) so a restored
    profile can't get stuck waiting on a battery slot that doesn't exist.

Review checklist

  • State machine covered by ChargingSessionStateMachineTest (35 cases)
  • Phantom in-case ear detection gated to AAP (ChargingActivityMapperTest)
  • New profile fields decode with defaults (AppleDeviceProfileSerializationTest)

Closes #575

@d4rken d4rken added the enhancement Add a new feature of improve an existing feature label Jun 10, 2026
@d4rken d4rken force-pushed the feat/charged-notification branch from d2be6ed to 775cfcd Compare June 10, 2026 16:09
@d4rken d4rken merged commit 2804543 into main Jun 10, 2026
11 checks passed
@d4rken d4rken deleted the feat/charged-notification branch June 10, 2026 16:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Add a new feature of improve an existing feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature Request: Notification category for "device is fully charged"

1 participant