We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents e3d8081 + e8d6e2c commit 1aefb52Copy full SHA for 1aefb52
custom_components/weback_vacuum/webackapi.py
@@ -31,6 +31,7 @@
31
32
# API
33
AUTH_URL = "https://user.grit-cloud.com/prod/oauth"
34
+AUTH_URL_CHINA = "https://user.grit-cloud.cn/prod/oauth"
35
ROBOT_UPDATE = "thing_status_update"
36
MAP_DATA = "map_data"
37
N_RETRY = 8
@@ -95,7 +96,13 @@ async def login(self) -> bool:
95
96
if self.verify_cached_creds():
97
return True
98
- resp = await self.send_http(AUTH_URL, **params)
99
+ # Checking if the region is China to use the Chinese Auth URL
100
+ if self.region == "86":
101
+ auth_url_selected = AUTH_URL_CHINA
102
+ else:
103
+ auth_url_selected = AUTH_URL
104
+
105
+ resp = await self.send_http(auth_url_selected, **params)
106
107
if resp is None:
108
_LOGGER.error(
0 commit comments