diff --git a/README.md b/README.md index 908c9b3..491ecf5 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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 diff --git a/scripts/sync_garmin.py b/scripts/sync_garmin.py index 61bb209..1f5d547 100644 --- a/scripts/sync_garmin.py +++ b/scripts/sync_garmin.py @@ -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) @@ -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))