Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ An [OpenClaw](https://openclaw.ai) skill that syncs your daily health data from

- **Sleep** — duration, stages (deep/light/REM/awake), sleep score
- **Body** — steps, calories, distance, floors
- **Heart** — resting HR, max HR, HRV
- **Heart** — resting HR, max HR, weekly vs. last night HRV
- **Body Battery & SpO2**
- **Stress** — average level
- **Training Readiness** — score and level
Expand All @@ -28,7 +28,7 @@ Sleep Score: 85
## Body: 9,720 steps | 2,317 cal
Distance: 8.0 km | Floors: 42
Resting HR: 37 bpm | Max HR: 111 bpm
HRV: 68 ms
Weekly HRV Avg: 68 ms | Last Night HRV Avg: 72 ms
SpO2: 94.0%

## Training Readiness: 100 (Prime) — Ready To Go
Expand Down
11 changes: 9 additions & 2 deletions scripts/sync_garmin.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,14 @@ def fetch_body(client: Garmin, day: str) -> str | None:
if hrv_data:
summary_hrv = hrv_data.get("hrvSummary", {})
if summary_hrv:
hrv = summary_hrv.get("weeklyAvg") or summary_hrv.get("lastNightAvg")
weekly_avg = summary_hrv.get("weeklyAvg")
last_night_avg = summary_hrv.get("lastNightAvg")
hrv_details = []
if weekly_avg:
hrv_details.append(f"Weekly HRV Avg: {weekly_avg} ms")
if last_night_avg:
hrv_details.append(f"Last Night HRV Avg: {last_night_avg} ms")
hrv = " | ".join(hrv_details)
except Exception as e:
if VERBOSE:
print(f" [verbose] HRV fetch failed: {e}", file=sys.stderr)
Expand Down Expand Up @@ -299,7 +306,7 @@ def fetch_body(client: Garmin, day: str) -> str | None:
if battery is not None:
extra_parts.append(f"Body Battery: {battery}")
if hrv is not None:
extra_parts.append(f"HRV: {hrv} ms")
extra_parts.append(f"{hrv}")
if extra_parts:
lines.append(" | ".join(extra_parts))

Expand Down