Skip to content

Commit 83636e4

Browse files
authored
Merge pull request #1664 from madveek/fix_login
Fix _get_notification_url to support new Xiaomi auth URL
2 parents 8aa175b + e8a0e1b commit 83636e4

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

custom_components/xiaomi_gateway3/core/xiaomi_cloud.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,10 @@ async def _get_credentials(self, data: dict) -> AuthResult:
185185
return {"ok": True, "token": f"{data['userId']}:{data['passToken']}"}
186186

187187
async def _get_notification_url(self, notification_url: str) -> AuthResult:
188-
assert "/identity/authStart" in notification_url, notification_url
189-
notification_url = notification_url.replace("authStart", "list")
188+
assert "/fe/service/identity/authStart" in notification_url, notification_url
189+
notification_url = notification_url.replace(
190+
"/fe/service/identity/authStart", "/identity/list"
191+
)
190192

191193
r = await self.session.get(notification_url)
192194
res1 = parse_auth_response(await r.read())

0 commit comments

Comments
 (0)