File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -96,12 +96,15 @@ async def _get_iot_login_info(self) -> IotLoginInfo:
9696 )
9797 else :
9898 raise RoborockException (f"{ response .get ('msg' )} - response code: { response_code } " )
99- if response ["data" ]["countrycode" ] is not None :
99+ country_code = response ["data" ]["countrycode" ]
100+ country = response ["data" ]["country" ]
101+ if country_code is not None and country is not None :
100102 self ._iot_login_info = IotLoginInfo (
101103 base_url = response ["data" ]["url" ],
102- country = response [ "data" ][ " country" ] ,
103- country_code = response [ "data" ][ "countrycode" ] ,
104+ country = country ,
105+ country_code = country_code ,
104106 )
107+ _LOGGER .debug ("Country determined to be %s and code is %s" , country , country_code )
105108 return self ._iot_login_info
106109 raise RoborockNoResponseFromBaseURL (
107110 "No account was found for any base url we tried. Either your email is incorrect or we do not have a"
You can’t perform that action at this time.
0 commit comments