cyberjunky / home-assistant-garmin_connect

The Garmin Connect integration allows you to expose data from Garmin Connect to Home Assistant.
MIT License
235 stars 33 forks source link

CNInvalid authentication #81

Open realall opened 1 year ago

realall commented 1 year ago

garmin fenix5 APAC CN use email and password show Invalid authentication

cyberjunky commented 1 year ago

@realall What country did you set in General Home Assistant settings? And can you test with latest version 0.2.16?

douglasleft commented 1 year ago

tested with version 0.2.16, still show Invalid authentication.

I tried modifying the file (custom_components/garmin_connect/init.py) Line 67: change the self.in_china = True , reboot HA, It still show Invalid authentication

cyberjunky commented 1 year ago

@douglasleft The integration check for certain Country selected and set the correct value (if you run one of the latest versions) Can you tell me which one you have selected? I cannot verify if something changed, it could be that Garmin changed something in their API which stopped it from working, or something er is wrong (temp block on your Garmin Connect account or something like that...

douglasleft commented 1 year ago

config-general - Country - 中国 (China),I can log in to my account at https://connect.garmin.cn/

hellkun commented 1 year ago

Ok, I have a workaround for this. Modify line 43 of config_flow.py, change: api = Garmin(username, password) to api = Garmin(username, password, True)

It worked for me.

douglasleft commented 1 year ago

Ok, I have a workaround for this. Modify line 43 of config_flow.py, change: api = Garmin(username, password) to api = Garmin(username, password, True)

It worked for me.

Thanks,It worked~