The unofficial Strava intregration for Home Assistant. Adds a custom component to integrate Strava activity data into Home Assistant.
When configuring the Strava API, the Authorization Callback Domain must be set to: my.home-assistant.io
- Gives you access to your most recent activities in Strava.
- Pulls Recent (last 4 weeks), Year-to-Date (YTD) and All-Time summary statistics
- Creates a camera entity in Home Assistant to feature recent Strava pictures as a photo-carousel
- Supports both the metric and the imperial unit system
- Activity data in Home Assistant auto-updates whenever you add, modify, or delete activities on Strava
- Activity Type Selection: Choose which of the 50 supported activity types to track
- Device Source Tracking: Automatically detects and displays the device used for each activity
- Gear Sensors: Track your bikes and shoes with distance and detailed information (brand, model, etc.)
- Multi-User Support: Add multiple Strava accounts, each with their own unique Strava app credentials
- Webhook-First Architecture: Uses Strava webhooks for real-time updates, respecting API rate limits
- Easy set-up: only enter your Strava Client-ID and Client-Secret and you're ready to go
This integration uses a webhook-first architecture to respect Strava's API rate limits:
- Initial Setup: Fetches your data once during configuration
- Real-Time Updates: Uses Strava webhooks to receive updates instantly when you add/modify activities
- No Continuous Polling: Never continuously polls the API, preventing rate limit issues
- API Rate Limit Compliance: Stays well within Strava's limits (100 requests/15min, 1000/day)
The Strava Home Assistant Integration creates sensor entities for each activity type you choose to track. For each selected activity type, you get:
Activity Sensors:
- Latest Activity: Shows the name of your most recent activity of that type
- Activity Details: Includes distance, time, elevation, heart rate, power, and more
- Device Information: Automatically detects and displays the device used (Garmin, Apple Watch, etc.)
Summary Statistics Sensors:
- Recent (last 4 weeks): Distance, activity count, and other metrics
- Year-to-Date: Cumulative statistics for the current year
- All-Time: Lifetime statistics for each activity type
Gear Sensors:
- Gear Name: Shows the name of each gear item (bike or shoe) with attributes including brand, model, and description
- Gear Distance: Tracks the total distance for each gear item with proper unit conversion
- Configure the number of gear sensors to display (1-20, default: 3)
Supported Activity Types: The integration supports all 50 Strava activity types including Run, Ride, Walk, Swim, Hike, AlpineSki, BackcountrySki, Badminton, Canoeing, Crossfit, EBikeRide, Elliptical, Golf, GravelRide, Handcycle, HighIntensityIntervalTraining, IceSkate, InlineSkate, Kayaking, Kitesurf, MountainBikeRide, NordicSki, Pickleball, Pilates, Racquetball, RockClimbing, RollerSki, Rowing, Sail, Skateboard, Snowboard, Snowshoe, Soccer, Squash, StairStepper, StandUpPaddling, Surfing, TableTennis, Tennis, TrailRun, Velomobile, VirtualRide, VirtualRow, VirtualRun, WeightTraining, Wheelchair, Windsurf, Workout, and Yoga.
You can use all sensor data in your Dashboards and Automations, just as you'd use any other sensor data in Home Assistant.
To use the Strava Home Assistant integration, your Home Assistant Instance must be accessible from an External URL (i.e. Remote Access). Without remote access, the integration won't be able to pull data from Strava. To learn how to set up Remote Access for Home Assistant, please visit the Official Documentation
If you use Nabu Casa then do this configuration from your Nabu Casa URL. You can find this under Configuration -> "Home Assistant Cloud"
For Single User Setup:
After you've set up remote access for your Home Assistant instance, click here or head over to your Strava Profile and go to Settings > My API Application.
Follow the steps in the configuration wizard, and eventually obtain your Strava API credentials (ID + secret). We need those credentials during the final installation step.
!!! IMPORTANT !!! The Authorization Callback Domain must be set to: my.home-assistant.io
For Multiple Users:
If you want to add multiple Strava accounts to Home Assistant, each user must create their own Strava app with unique credentials. Strava only supports one athlete per Strava app, so you cannot reuse the same app credentials for different accounts. See the "Adding Multiple Strava Accounts" section below for detailed instructions.
As of now, the Strava Home Assistant Integration can only be installed as a custom repository through the Home Assistant Community Store (HACS). The installation process is super easy
Now is the time to fire up the Strava Home Assistant Integration for the first time and make a connection between Strava and your Home Assistant Instance.
From within Home Assistant, head over to Configuration > Integrations and hit the + symbol at the bottom. Search for "Strava Home Assistant" and click on the icon to add the Integration to Home Assistant. You'll automatically be prompted to enter your Strava API credentials. It'll take a few seconds to complete the set-up process after you've granted all the required permissions.
The integration supports multiple Strava users in a single Home Assistant instance. Each user must have their own unique Strava app credentials.
Important Requirements:
- Each Strava account requires its own unique Strava app (Client ID and Client Secret)
- Strava only supports one athlete per Strava app - you cannot use the same app credentials for multiple accounts
- Each user will have their own separate integration entry in Home Assistant
- Each user's data is completely isolated
To add an additional Strava account:
- The second user must create their own Strava app at https://www.strava.com/settings/api
- Set the Authorization Callback Domain to: my.home-assistant.io
- In Home Assistant, go to
Configuration>Integrationsand click the+button - Search for "Strava Home Assistant" and add the integration again
- Enter the new user's unique Client ID and Client Secret
- Complete the OAuth2 authentication flow for the second user
Note: You can add as many Strava accounts as needed, as long as each account has its own unique Strava app credentials.
Upon completion of the installation process, the Strava Home Assistant integration automatically creates sensor entities for the activity types you select. By default, the integration tracks Run, Ride, and Swim activities.
You can choose which activity types to track from the 50 supported Strava activity types.
- Go to
Configuration>Integrations - Find the Strava Home Assistant Integration and click
CONFIGURE - Select the activity types you want to track from the multi-select list
- Save your settings
The integration will create sensors for each selected activity type, showing your latest activity and summary statistics.
Three configurations for the distance unit system are available.
Defaultuses the Home AssistantUnit SystemconfigurationMetricuses kilometers (km) and meters (m) for distancesImperialuses miles (mi) and feet (ft) for distances
This setting is selectable during initial setup and can be changed later under Configuration > Integrations > CONFIGURE.
You can enable or disable automatic photo updates for the camera entity. When enabled, the integration will fetch new photos from your activities and update the camera entity accordingly.
You can enable gear sensors to track your bikes and shoes from Strava. When enabled, the integration will:
- Fetch your most recently used gear items (bikes and shoes combined)
- Create a device for each gear item
- Create two sensors per gear:
- Gear Name: Shows the gear name with attributes (id, brand_name, model_name, primary, description)
- Gear Distance: Shows the total distance for the gear with proper unit conversion
Configuration Options:
- Enable Gear Sensors: Checkbox to enable/disable gear sensors
- Number of Gear Sensors: Slider to select how many gear items to track (1-20, default: 3)
The gear items are sorted by distance (most used first), and the integration respects API rate limits by caching gear details.
NOTES
- Changing the unit system setting will require a restart of Home Assistant to be fully applied.
- The integration now fetches up to 200 activities instead of being limited to 10.
- Device source tracking automatically detects the device used for each activity (Garmin, Apple Watch, etc.).
Forked from https://github.com/madmic1314/ha_strava (project abandoned).
Originally forked from https://github.com/codingcyclist/ha_strava (project abandoned).