home-assistant-garmin_connect icon indicating copy to clipboard operation
home-assistant-garmin_connect copied to clipboard

About the problem of logging in to garmin connect in China

Open solitudechn opened this issue 2 years ago • 6 comments

Hi, I found that my garmin Chinese account cannot log in by default, this is because line 108 in the python package garminconnect defaults to Chinese is_cn=False, can you add a switch on the login page to allow us to manually What about changing this parameter to True? If possible, I think this can greatly reduce login problems for Chinese users. thanks

solitudechn avatar May 02 '22 04:05 solitudechn

@solitudechn Are you having this problem when using with Home Assistant? Or seperate?

cyberjunky avatar May 24 '22 19:05 cyberjunky

This problem occurs when using it with Home Assistant. Because I can't log into my garmin account on Home Assistant.

@solitudechn Are you having this problem when using with Home Assistant? Or seperate?

solitudechn avatar May 26 '22 15:05 solitudechn

I am a user from China,too. I try many times to login, finally succeeded. But all the sensor state is "unknown". It seems doesn't work well in my HA.

arthurfsy avatar Sep 22 '22 07:09 arthurfsy

Hi, I found that my garmin Chinese account cannot log in by default, this is because line 108 in the python package garminconnect defaults to Chinese is_cn=False, can you add a switch on the login page to allow us to manually What about changing this parameter to True? If possible, I think this can greatly reduce login problems for Chinese users. thanks

Hi, I met this problem today,too. I set 'is_cn=True', and run the 'python3 ./example.py', I can get my data correctly, But when I using with Home Assistant, it doesn't get the data.

IMPORTANT : After modify the file (custom_components/garmin_connect/init.py)

Line 61 : change the self._api = Garmin(entry.data[CONF_USERNAME], entry.data[CONF_PASSWORD]) to the self._api = Garmin(entry.data[CONF_USERNAME], entry.data[CONF_PASSWORD], True) , then reboot the HA, I found it WORK!

arthurfsy avatar Mar 08 '23 03:03 arthurfsy

Hi, I found that my garmin Chinese account cannot log in by default, this is because line 108 in the python package garminconnect defaults to Chinese is_cn=False, can you add a switch on the login page to allow us to manually What about changing this parameter to True? If possible, I think this can greatly reduce login problems for Chinese users. thanks

Hi, I met this problem today,too. I set 'is_cn=True', and run the 'python3 ./example.py', I can get my data correctly, But when I using with Home Assistant, it doesn't get the data.

IMPORTANT : After modify the file (custom_components/garmin_connect/init.py)

Line 61 : change the self._api = Garmin(entry.data[CONF_USERNAME], entry.data[CONF_PASSWORD]) to the self._api = Garmin(entry.data[CONF_USERNAME], entry.data[CONF_PASSWORD], True) , then reboot the HA, I found it WORK!

108行的is_cn是在哪个文件里头?

EvanVV avatar Apr 04 '23 12:04 EvanVV

I will check how to gather the users Country settings from the integration and set the variable accordingly.

cyberjunky avatar Apr 04 '23 16:04 cyberjunky

Issue should be fixed in version 0.2.15

cyberjunky avatar Apr 05 '23 15:04 cyberjunky