File tree Expand file tree Collapse file tree 3 files changed +17
-1
lines changed
Expand file tree Collapse file tree 3 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ pycryptodome = "~3.17.0"
2727pycryptodomex = {version = " ~3.17.0" , markers = " sys_platform == 'darwin'" }
2828paho-mqtt = " ~1.6.1"
2929dacite = " ~1.8.0"
30- construct = " ^2.10.68 "
30+ construct = " ^2.10.56 "
3131
3232
3333[build-system ]
Original file line number Diff line number Diff line change 3939 RoborockException ,
4040 RoborockInvalidCode ,
4141 RoborockInvalidEmail ,
42+ RoborockInvalidUserAgreement ,
43+ RoborockNoUserAgreement ,
4244 RoborockTimeout ,
4345 RoborockUrlException ,
4446 VacuumError ,
@@ -474,6 +476,12 @@ async def code_login(self, code) -> UserData:
474476 if response_code != 200 :
475477 if response_code == 2018 :
476478 raise RoborockInvalidCode ("Invalid code - check your code and try again." )
479+ if response_code == 3009 :
480+ raise RoborockNoUserAgreement ("You must accept the user agreement in the Roborock app to continue." )
481+ if response_code == 3006 :
482+ raise RoborockInvalidUserAgreement (
483+ "User agreement must be accepted again - or you are attempting to use the Mi Home app account."
484+ )
477485 raise RoborockException (f"{ login_response .get ('msg' )} - response code: { response_code } " )
478486 user_data = login_response .get ("data" )
479487 if not isinstance (user_data , dict ):
Original file line number Diff line number Diff line change @@ -52,3 +52,11 @@ class RoborockInvalidCode(RoborockException):
5252
5353class RoborockInvalidEmail (RoborockException ):
5454 """Class for Roborock invalid formatted email exceptions."""
55+
56+
57+ class RoborockInvalidUserAgreement (RoborockException ):
58+ """Class for Roborock invalid user agreement exceptions."""
59+
60+
61+ class RoborockNoUserAgreement (RoborockException ):
62+ """Class for Roborock no user agreement exceptions."""
You can’t perform that action at this time.
0 commit comments