Strava Home Assistant Integration

since couple of days i have the problem with the totals and years totals, someone else too?

Hi
I need to reboot HA to see my last run. Is it normal ?
Thanks

I used this excellent integration with an e-display, See :

kudos to you @codingcyclist for creating it !

All these steps are fairly straightforward.
My issue may be related to the Strava authorization callback domain.
My nabu casa cloud account uses https://, but strava says this regarding the authorization callback domain: “This field must be just a domain, no slashes or paths”.
So I’m wondering if adding the integration times out because it defaults to http:// which doesn’t work with my nabu casa link.
Thoughts?

After updating to the latest version i am getting this error “Setup failed for ha_strava: Integration not found.” any ideas? I removed it from HACS and tried to install it again but no luck

3 Likes

Same problem here. Do you have it already working?

Tried removing and reinstalling, getting this error:

This error originated from a custom integration.

Logger: homeassistant
Source: custom_components/ha_strava/sensor.py:334
Integration: Strava Home Assistant (documentation)
First occurred: 9:38:01 AM (3 occurrences)
Last logged: 9:38:11 AM

Error doing job: Future exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/ha_strava/sensor.py", line 404, in strava_data_update_event_handler
    self.async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 368, in async_write_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 402, in _async_write_ha_state
    state = self._stringify_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 374, in _stringify_state
    state = self.state
  File "/config/custom_components/ha_strava/sensor.py", line 334, in state
    pace = self._data[CONF_SENSOR_MOVING_TIME] / (
ZeroDivisionError: float division by zero

Worth noting, the last activity in Strava is listed a ‘Workout’ type. Does this integration filter run/bike/hike into those categories and everything else into ‘Other’?

Also worth noting that the last activities (I track last 4) are working, but the YTD stats are not (showing unavailable)

I also use DuckDNS but I can’t get it to work :frowning: Which URL do you use in your callbackdomein in Strava?

Add this to your config.yaml your wond duckdns/ i think this should be working

homeassistant:
external_url: https://****************.duckdns.org/

2 Likes

I submitted a PR, but if you want a workaround right now, you need to edit the manifest.json file and add the “version” key. I’m using the one below and it works again.

{
  "domain": "ha_strava",
  "name": "Strava Home Assistant",
  "config_flow": true,
  "documentation": "https://github.com/codingcyclist/ha_strava",
  "requirements": ["aiohttp==3.6.1", "voluptuous==0.11.7"],
  "dependencies": [],
  "version": "0.1.1",
  "codeowners": ["@codingcyclist"]
}
1 Like

Hi guys,
Why I cant see in the integrations the strava? I cant install it…
thx W

same here from many month
Hacs integration find it (after having add the corresponding repository), but then after reboot, if I try to add the real integration (under Configuration/Integration), ha_strava is not found

1 Like

I cant find Strava in the official integration site! Was it remove?

Same here Integration not visible anymore since a previous HA Update (don’t remind which version)
I was hoping to see it coming back after several relelase, but still nothing so far…

I use the following integration and it still works: https://github.com/codingcyclist/ha_strava

1 Like

I’m getting

2021-11-25 16:39:29 ERROR (SyncWorker_3) [homeassistant.loader] The custom integration 'ha_strava' does not have a version key in the manifest file and was blocked from loading. See https://developers.home-assistant.io/blog/2021/01/29/custom-integration-changes#versions for more details

Ok, I fixed this by manually adding a version in the manifest. But now when returning from the Strava URL, the dialog stays open to go to an external website :frowning:

HA says:

500 Internal Server Error

Server got itself in trouble

Turns out there was a space at the end of my client secret when copying from the Strava site which caused this. Working now :slight_smile:

2 Likes

seems the latest HASS update has broken this integration for now

1 Like