Skip to content

Commit

Permalink
🔐 fix for auth err (#1899)
Browse files Browse the repository at this point in the history
  • Loading branch information
al-one committed Nov 1, 2024
1 parent 746402f commit 4f22d5c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 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,8 @@ async def async_check_auth(self, notify=False):
rdt = await self.async_request_api(api, dat, method='POST') or {}
nid = f'xiaomi-miot-auth-warning-{self.user_id}'
eno = rdt.get('code', 0)
if eno != 3:
msg = rdt.get('message', '')
if not (eno == 3 or msg == 'auth err'):
return True
except requests.exceptions.ConnectionError:
return None
Expand Down

0 comments on commit 4f22d5c

Please sign in to comment.