Skip to content

recovery_time_hours returns raw minutes, not hours (get_morning_training_readiness) #187

Description

@Jabo

Bug: get_morning_training_readiness returns recovery_time_hours values that are wildly too high (e.g. 314, 2601). Observed on the actual Garmin Connect app/device at the same time: 41 hours.

Root cause: in src/garmin_mcp/health_wellness.py, line 886:

"recovery_time_hours": readiness.get('recoveryTime'),

This passes Garmin's raw recoveryTime value straight through, but that field is in minutes, not hours. Elsewhere in the same file (line 220) the conversion is done correctly:

"recovery_time_hours": round(r.get('recoveryTime', 0) / 60, 1) if r.get('recoveryTime') else None,

Evidence: 2601 (reported) / 60 = 43.4h, which is very close to the real 41h shown on-device. Confirms the field is minutes being mislabeled as hours.

Suggested fix: apply the same / 60 conversion at line 886 as is already used at line 220.

Repro: call get_morning_training_readiness for any date and compare the returned recovery_time_hours to the recovery time shown in the Garmin Connect app for that day.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions