madmic1314 / ha_strava Goto Github PK
View Code? Open in Web Editor NEWThis project forked from codingcyclist/ha_strava
Activity Data from Strava directly into Home Assistant
License: MIT License
This project forked from codingcyclist/ha_strava
Activity Data from Strava directly into Home Assistant
License: MIT License
Updated this afternoon. It was working this morning, and no longer after going to the Beta May release.
When added to HACS the repo files are downloaded to the root:
" repository.note_downloaded '/config/custom_components/' "
No idea why...
Have my Peloton connected to Strava. If I do a 'stretch' after a ride, this syncs to Strava, though with 0 distance. This appears to be throwing Div/0 errors when trying to calculate the PACE for this event:
This error originated from a custom integration.
Logger: homeassistant
Source: custom_components/ha_strava/sensor.py:334
Integration: HA Strava (documentation)
First occurred: 8:44:15 AM (2 occurrences)
Last logged: 8:44:24 AM
Error doing job: Future exception was never retrieved
Traceback (most recent call last):
File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, 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 505, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 538, in _async_write_ha_state
state = self._stringify_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 511, in _stringify_state
if (state := self.state) is None:
File "/config/custom_components/ha_strava/sensor.py", line 334, in state
pace = self._data[CONF_SENSOR_MOVING_TIME] / (
ZeroDivisionError: float division by zero
this is ok
other acctivity no
Today i have another activity but do not appear
the count has stopped yesterday!
and the test a 0 distance exercise not appear
Originally posted by @maobuz in #3 (comment)
In Newest HA:
2022-04-17T09:17:46.264257842Z 2022-04-17 11:17:46 ERROR (MainThread) [homeassistant.helpers.template] Template variable error: dict object has no element 1 when rendering '{{ value_json.1.value }}' 2022-04-17T09:17:46.276136155Z 2022-04-17 11:17:46 ERROR (MainThread) [homeassistant.helpers.template] Template variable error: dict object has no element 0 when rendering '{{ value_json.0.value }}' 2022-04-17T09:17:54.841698217Z 2022-04-17 11:17:54 ERROR (MainThread) [homeassistant] Error doing job: Future exception was never retrieved 2022-04-17T09:17:54.841732977Z Traceback (most recent call last): 2022-04-17T09:17:54.841738405Z File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 58, in run 2022-04-17T09:17:54.841742473Z result = self.fn(*self.args, **self.kwargs) 2022-04-17T09:17:54.841745810Z File "/config/custom_components/ha_strava/camera.py", line 168, in img_update_handler 2022-04-17T09:17:54.841749391Z self._urls = { 2022-04-17T09:17:54.841752724Z TypeError: unhashable type: 'slice' 2022-04-17T09:17:55.001532169Z 2022-04-17 11:17:55 ERROR (MainThread) [homeassistant.components.google_assistant.http] No configuration for request_sync available
Hi, HA throws this error, and although the integration works perfectly, I just wanted to log it.
It only happens at initialization of the component.
This error originated from a custom integration.
Logger: homeassistant
Source: custom_components/ha_strava/__init__.py:417
Integration: HA Strava (documentation)
First occurred: 09:45:57 (2 occurrences)
Last logged: 09:46:24
Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/aiohttp/connector.py", line 986, in _wrap_create_connection
return await self._loop.create_connection(*args, **kwargs) # type: ignore[return-value] # noqa
File "/usr/local/lib/python3.9/asyncio/base_events.py", line 1081, in create_connection
transport, protocol = await self._create_connection_transport(
File "/usr/local/lib/python3.9/asyncio/base_events.py", line 1111, in _create_connection_transport
await waiter
ConnectionResetError
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/config/custom_components/ha_strava/__init__.py", line 560, in strava_startup_functions
await renew_webhook_subscription(
File "/config/custom_components/ha_strava/__init__.py", line 417, in renew_webhook_subscription
callback_response = await websession.get(url=config_data[CONF_CALLBACK_URL])
File "/usr/local/lib/python3.9/site-packages/aiohttp/client.py", line 535, in _request
conn = await self._connector.connect(
File "/usr/local/lib/python3.9/site-packages/aiohttp/connector.py", line 542, in connect
proto = await self._create_connection(req, traces, timeout)
File "/usr/local/lib/python3.9/site-packages/aiohttp/connector.py", line 907, in _create_connection
_, proto = await self._create_direct_connection(req, traces, timeout)
File "/usr/local/lib/python3.9/site-packages/aiohttp/connector.py", line 1206, in _create_direct_connection
raise last_exc
File "/usr/local/lib/python3.9/site-packages/aiohttp/connector.py", line 1175, in _create_direct_connection
transp, proto = await self._wrap_create_connection(
File "/usr/local/lib/python3.9/site-packages/aiohttp/connector.py", line 992, in _wrap_create_connection
raise client_error(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host un4ne7yr6ue8u402igjf1f18fy62ybnh.ui.nabu.casa:443 ssl:default [None]
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.