ha_strava icon indicating copy to clipboard operation
ha_strava copied to clipboard

HA Strava fails to startup with HA 2022.5

Open jouster1974 opened this issue 2 years ago • 12 comments

HA Strava was all working fine on 2022.4.7....testing on 2022.5 and getting the following error on start

Setup failed for custom integration ha_strava: Unable to import component: cannot import name 'EVENT_TIME_CHANGED' from 'homeassistant.const' (/usr/src/homeassistant/homeassistant/const.py)

Any idea what might be causing the issue...have had a look about and cant see anyone else reporting

jouster1974 avatar May 05 '22 13:05 jouster1974

Yep. This is because there is a breaking change of the time_changed event being removed. Unfortunately the fix is beyond my limited skills

https://developers.home-assistant.io/blog/2022/04/20/saying-goodbye-to-event_time_changed/

jartill avatar May 05 '22 14:05 jartill

thanks for the update and for taking the time to comment...beyond mine too

jouster1974 avatar May 05 '22 14:05 jouster1974

Same for me. I also had to change the manifest file to use voluptuous 0.13.1 to get to this error otherwise it threw a voluptuous error instead.

BertrumUK avatar May 05 '22 16:05 BertrumUK

I’ve got it working again for me by hashing out the offending line. I do get a camera error on a HA restart, but as I do not use the camera, it’s not an issue for me.

The line is I. The init_py file

CONF_WEBHOOK_ID, EVENT_COMPONENT_LOADED, EVENT_CORE_CONFIG_UPDATE, EVENT_HOMEASSISTANT_START, #EVENT_TIME_CHANGED,

BertrumUK avatar May 05 '22 19:05 BertrumUK

EF42BB6F-6AE3-4DB3-B4DC-818242A3FB89

BertrumUK avatar May 05 '22 19:05 BertrumUK

@BertrumUK you superstar...I did look through a couple of files for the EVENT_TIME_CHANGED but didn't check this one...now hashed out and working perfectly again..I also don't use images

jouster1974 avatar May 05 '22 19:05 jouster1974

Hashing out line 20 in camera.py clears the error on a restart

) from hashlib import md5 #from homeassistant.const import EVENT_TIME_CHANGED

BertrumUK avatar May 06 '22 07:05 BertrumUK

i commented a line 28 in init.py, line 20 in camera.py and works for me. image

jfmfreire avatar May 06 '22 08:05 jfmfreire

i am wondering if this strava is so cumbersome, i set up the connection between strava and fitbit and fitbit is basic integration in HA... What do you think?

woolf0007 avatar May 07 '22 16:05 woolf0007

i am wondering if this strava is so cumbersome, i set up the connection between strava and fitbit and fitbit is basic integration in HA... What do you think?

Does any level of information get lost in transit?

bjornsivertsen avatar May 07 '22 17:05 bjornsivertsen

I opened a PR (https://github.com/codingcyclist/ha_strava/pull/46) to remove these two constants from both files. Once accepted, everything will work fine again. :+1:

youdroid avatar May 09 '22 20:05 youdroid

I have a working forked version of this here: https://github.com/craibo/ha_strava

craibo avatar May 25 '22 06:05 craibo