Skip to content

Sleep Tracking (in bed missing) / 5.0 #249

Description

@adrnxq

Which metric?

Sleep Stages

What it showed, and why you think it's wrong

When tracking sleep with Whoop through Edge (OpenStrap), the data synced to Apple Health is inaccurate. After comparing the sleep stages generated by Edge with another open-source alternative (⁠noop⁠), it appears the issue stems from Edge missing the "In Bed" (Time in Bed) metric when writing to HealthKit.
Actual Behavior:
Edge exports sleep stages to Apple Health but fails to include the "In Bed" metric. Because Apple Health receives an incomplete data set, third-party dashboards that rely on this data misinterpret the sleep sessions.
For example, when viewing last night's data in Bevel (an external dashboard that fetches data via Apple Health), it incorrectly registered only 3 hours of actual sleep, while categorizing the rest of the night as a "nap."
Expected Behavior:
Edge should include the "In Bed" metric alongside the specific sleep stages when writing to Apple Health. This ensures that the total sleep duration and continuity are accurately reflected and can be correctly parsed by both Apple Health and external apps.
Steps to Reproduce:

  1. Sync Whoop sleep data using Edge.
  2. Allow Edge to write the sleep data to Apple Health.
  3. Open Apple Health (or a third-party app like Bevel) and observe the fragmented/incorrect sleep duration and missing "In Bed" time.
    Additional Context:
    The open-source app ⁠noop⁠ handles this sync correctly by consistently passing the "In Bed" metric to HealthKit alongside the other stages. Reviewing how ⁠noop⁠ formats its HealthKit payload might be a helpful reference for a fix.
    Because Apple Health acts as the middleman, the flawed import from Edge cascades into any other health dashboard the user relies on.

What kind of wrong?

Confident number where the data is missing (should show "—")

App version

0.9.25+56

Which band?

WHOOP 5.0 / MG (experimental — expect breakage)

Screenshots

Image Image Image Image Image Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions