Oura integration: Sleep duration incorrectly records nap instead of main overnight sleep when multiple sessions exist on the same day

When Oura logs both a main overnight sleep (type: long_sleep) and a nap (type: sleep) on the same calendar day, Intervals.icu stores the nap duration in sleepSecs rather than the overnight duration.

The sleepScore and avgSleepingHR appear correct (they come from the main sleep), but sleepSecs is wrong.

Matches between Intervals sleepSecs and Oura nap duration on my profile:

│ Date │ Intervals sleepSecs │ Oura main sleep │ Oura nap │
│ 2026-01-06 │ 0.47h │ 7.47h │ 0.47h ✗ │
│ 2026-01-07 │ 0.07h │ 7.28h │ 0.07h ✗ │
│ 2026-01-09 │ 0.23h │ 6.49h │ 0.23h ✗ │
│ 2026-01-10 │ 0.62h │ 7.28h │ 0.62h ✗ │
│ 2025-10-29 │ 0.12h │ 6.98h │ 0.12h ✗ │
│ 2025-11-01 │ 0.73h │ 7.47h │ 0.73h ✗ │
│ 2026-02-17 │ 1.54h │ 7.40h │ 1.54h ✗ │
│ 2026-02-21 │ 0.78h │ 8.04h │ 0.78h ✗ │

9/9 anomalous days confirmed as nap duration. The match is exact to the second in every case.

Expected behaviour: sleepSecs should reflect the longest session (type: long_sleep) when multiple sessions exist, or the sum of all the sessions of the day

Device: Oura Ring (v2 API), synced to Intervals.icu.

Are you still having issues with Oura sleep data?

Mostly fixed, but the bug has reappeared on 7 recent days

Checked 94 days from 2025-10-01 to 2026-05-19 that had both a long_sleep and a nap in Oura.

Behaviour pattern:

  • 87 days (Oct 2025 – mid-April 2026): Intervals sleepSecs = long_sleep + nap :white_check_mark:
  • 6 days (24, 25, 28 April; 1, 2, 10 May 2026): Intervals sleepSecs exactly matches the nap duration — the original bug recurring. ✗
  • 1 day (19 April 2026): Intervals shows 0.24h (864s); doesn’t match long, nap, or sum. No idea what is that?

│ Date │ Intervals │ Oura long │ Oura nap │ Verdict │
│ 2026-04-19 │ 0.24h │ 7.01h │ 0.26h │ anomaly │
│ 2026-04-24 │ 0.01h │ 6.86h │ 0.01h │ BUG (nap only) │
│ 2026-04-25 │ 0.80h │ 7.22h │ 0.80h │ BUG (nap only) │
│ 2026-04-28 │ 0.56h │ 6.12h │ 0.56h │ BUG (nap only) │
│ 2026-05-01 │ 0.53h │ 7.97h │ 0.53h │ BUG (nap only) │
│ 2026-05-02 │ 0.67h │ 7.81h │ 0.67h │ BUG (nap only) │
│ 2026-05-10 │ 0.48h │ 7.52h │ 0.48h │ BUG (nap only) │

Notably, all the original 8 dates reported (2025-10-29, 2025-11-01, 2026-01-06, etc.) now show the correct summed value — so the historical data was backfilled. But something has
regressed in the last ~4 weeks: every day since 24 April that had a nap is wrong again, while days without naps (e.g. 2026-05-15, -16, -18) are fine.