Skip to content

Commit

Permalink
🔧 fix login xiaomi cloud (#1956)
Browse files Browse the repository at this point in the history
  • Loading branch information
al-one committed Nov 19, 2024
1 parent c23fcd8 commit 1ad418b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion custom_components/xiaomi_miot/core/xiaomi_cloud.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,13 @@ async def async_check_auth(self, notify=False):
rdt = await self.async_request_api(api, dat, method='POST') or {}
eno = rdt.get('code', 0)
msg = rdt.get('message', '')
if not (eno in [2, 3] or 'auth err' in msg):
if eno in [2, 3]:
pass
elif 'auth err' in msg:
pass
elif msg in ['invalid signature', 'SERVICETOKEN_EXPIRED']:
pass
else:
return True
except requests.exceptions.ConnectionError:
return None
Expand Down

1 comment on commit 1ad418b

@orwoods
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is critical! Please release the hotfix

Please sign in to comment.