Skip to content

CraigBell/strava_connect

Repository files navigation

hacs_badge GitHub release (latest by date) Integration Usage Maintained by Craig Bell

Strava Connect for Home Assistant

Strava Connect – A Home Assistant integration for Strava data (unofficial) maintained by Craig Bell.

Strava Connect keeps your Home Assistant instance in sync with Strava: it streams recent activities, detailed stats, athlete gear history, a dynamic shoes catalog, and optional Stryd pod ↔ shoe mappings using Home Assistant helpers—all delivered through webhook-driven updates that respect Strava rate limits.

Features

  • Recent activity sensors with rich metrics, device details, location data, and optional photo carousel camera.
  • Summary statistics for recent (4-week), year-to-date, and all-time totals across multiple sport types.
  • Gear awareness including a live shoes catalog sensor, Strava gear metadata, and friendly Strava gear links.
  • Stryd companion tooling: map Bluetooth pods to shoes via input_select helpers and surface the resolved pairings as catalog attributes.
  • Webhook-first architecture that avoids polling and stays within Strava API quotas.

MVP Features

  • Dynamic Shoes Catalog sensor with normalized gear metadata and pod helper attributes.
  • Two optional input_select helpers for maintaining Stryd pod ↔ shoe assignments without conflicts.
  • New Home Assistant service ha_strava.set_activity_gear to update historical activities with the right shoe.
  • Enforced Strava OAuth scopes with automatic reauthorization prompts when permissions shrink.

Installation (HACS)

  1. Make sure your Home Assistant instance is reachable from the internet (required for Strava webhooks).
  2. Add this repository (CraigBell/strava_connect) as a custom integration in HACS.
  3. Download Strava Connect, restart Home Assistant, and add the integration from Settings → Devices & Services.
  4. Supply your Strava API Client ID and Client Secret, then approve the authorization prompt.

Note: The integration domain remains ha_strava, so existing entity IDs and automations continue to work.

What's New

  • v0.14 – Ensures the Strava auth flow explicitly requests the full gear read/write scope set so shoes and activity updates work immediately after install.
  • v0.13 – Adds full athlete gear sync, the ha_strava.set_activity_gear service, and stricter OAuth scope enforcement with rate-limit handling.

Documentation & Support

Service: ha_strava.set_activity_gear

Assign the correct shoe to a Strava activity directly from Home Assistant. Provide either a shoe_id or a shoe_name that exists in the shoes catalog sensor.

service: ha_strava.set_activity_gear
data:
  activity_id: "1234567890"
  shoe_name: "Nike Pegasus 40"

On success the integration fires an event ha_strava.activity_gear_set which you can use for automations.

Required Strava Scopes

Authorize with the full scope string to unlock gear read/write support:

read,read_all,profile:read_all,activity:read_all,activity:write

If any scope is missing, the integration blocks gear writes and prompts for reauthorization via the Home Assistant UI.

Troubleshooting

  • Missing shoes or bikes? Reauthorize with the profile:read_all scope.
  • 403 when setting gear? Ensure the app has activity:write; reauthorize if necessary.
  • 429 rate limit warnings? Strava quota was reached—wait a few minutes before retrying.
  • Service cannot find your shoe name? Confirm the shoe exists in the Shoes Catalog sensor and that the name matches exactly (case sensitive).

Topics

home-assistant · strava · integration · fitness · running · cycling

About

No description, website, or topics provided.

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors