Repository navigation
What's Changed
This release adds nutrition (food search and logging, custom foods and meals, recipes), lifestyle logging, more sleep editing (notes, added nights, naps, sleep scores), upload consent, Health Status and more activity details, and a strength-exercise catalog verified against Garmin. It fixes strength workout weights being sent 1000× too heavy, and it keeps the login ticket out of logs and error messages after MFA.
Added
- Nutrition: search foods and look them up by barcode or free text, then log, change, copy, move and remove food logs, including photo recognition of a meal. Manage custom foods, custom meals, favorites and recipes, and change meal windows and calorie and macro goals. All of this is in
demo.pyunder Nutrition. Thanks @ttlopes! (#496, #497, #498, #499) - Lifestyle logging: choose which behaviors are tracked, log them per day, create custom behaviors, change the auto-logging setting, and read logging completion over a range with
get_lifestyle_logging_stats(). Thanks @ttlopes! (#492, #503) - Sleep:
set_sleep_note()/delete_sleep_note(),create_sleep_window()to add a night to a day without one,add_nap()/set_nap_window()/delete_nap(), and daily and weekly sleep scores. Thanks @ttlopes! (#494) - Upload consent:
has_upload_consent(),get_consent_text(),grant_upload_consent()anddecline_upload_consent(). Granting cannot be undone with the library. Thanks @ttlopes! (#493) - Health Status and other health reads:
get_health_status(),get_health_status_range(),get_body_battery_message(),get_manual_stress_levels(),get_blood_pressure_categories(),get_stamina_curve_change()andget_pushes_goal(). Thanks @ttlopes! (#500) - More activity details: the full-resolution track, time in bike gear, stamina time in zones, Connect IQ fields, linked workouts, and the activity type for a FIT sport. Thanks @ttlopes! (#502)
- Strength progress per exercise:
get_exercise_stats()returns sets, reps, volume and heaviest weight per day or month. Thanks @ttlopes! (#504)
Changed
- Missing upload consent raises
GarminConnectConsentRequiredError: this is a subclass ofGarminConnectConnectionError, so existing handlers keep working. (#493) - The strength-exercise catalog has 1,830 exercises in 53 categories, each verified against Garmin, with muscles and equipment,
by_muscle()andby_equipment(). Old names keep resolving to the same exercises, exceptBarbell Shoulder Press, which Garmin stores as empty. Thanks @ttlopes! (#491) set_sleep_window()now refuses windows of 24 hours or more, and acdatethat isn't the wake-up day. (#494)
Fixed
- Strength workout weights are sent in kilograms: they were multiplied by 1000, so a 120 kg target showed as 120,000 kg. Thanks @burczyk! (#505)
- The login ticket no longer reaches logs or error messages after MFA: this happened when the token exchange and then the fallback request both failed. The error is now redacted. With
prompt_mfa, such a failure now moves on to the next login strategy instead of endinglogin(). (#508) login()withreturn_on_mfa=Truenow loads the profile when no MFA is needed. (#496)example.pyno longer crashes on a day without data. Thanks @ttlopes! (#495)
Development
scripts/generate_exercises.pycan fetch, verify (--verify) and check (--check) the exercise catalog against Garmin. These modes create and delete temporary workouts, so use a throwaway test account. Thanks @ttlopes! (#491)
See CHANGELOG.md for full details.
Full Changelog: 0.3.21...0.3.22