mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-08 12:32:43 +00:00
`aggregate=daily|weekly|monthly` averaged step counts (and every other cumulative HK type) instead of summing — partial-day rows collapsed to a per-bucket mean rather than the daily total. Five rows of 1000 steps reported 1000, not 5000. Add `CUMULATIVE_HK_TYPES` in `apple-health-mapping.ts` listing the five cumulative MeasurementTypes the iOS / Withings ingest path emits (`ACTIVITY_STEPS`, `ACTIVE_ENERGY_BURNED`, `FLIGHTS_CLIMBED`, `WALKING_RUNNING_DISTANCE`, `TIME_IN_DAYLIGHT`). The route picks `SUM(value)` for those types and keeps `AVG(value)` for every spot metric (BP, pulse, weight, BG, body fat, mood, sleep). Two new integration cases pin the contract: a step day collapses to the per-row sum; a pulse day still averages.