Skip to content

Commit

Permalink
Disable auto relogin for "login from another place" error
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexxIT committed Sep 17, 2024
1 parent 8b94b3d commit 1a5159c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions custom_components/sonoff/core/ewelink/cloud.py
Original file line number Diff line number Diff line change
Expand Up @@ -572,8 +572,11 @@ async def connect(self) -> bool:
# {'error': 406, 'reason': 'Authentication Failed'}
# can happened when login from another place with same user/appid
if error == 406:
_LOGGER.warning("You logged in from another place")
self.auth = None
_LOGGER.error(
"You logged in from another place, read more "
"https://github.com/AlexxIT/SonoffLAN#configuration"
)
# self.auth = None
return False

raise Exception(resp)
Expand Down

0 comments on commit 1a5159c

Please sign in to comment.