mirror of
https://github.com/XiaoMi/ha_xiaomi_home.git
synced 2025-04-03 08:15:30 +08:00
fix: fix miot cloud token refresh (#307)
This commit is contained in:
parent
67785f747a
commit
f87e746188
@ -204,7 +204,7 @@ class MIoTOauthClient:
|
|||||||
if not isinstance(refresh_token, str):
|
if not isinstance(refresh_token, str):
|
||||||
raise MIoTOauthError('invalid refresh_token')
|
raise MIoTOauthError('invalid refresh_token')
|
||||||
|
|
||||||
return await self._get_token_async(data={
|
return await self.__get_token_async(data={
|
||||||
'client_id': self._client_id,
|
'client_id': self._client_id,
|
||||||
'redirect_uri': self._redirect_url,
|
'redirect_uri': self._redirect_url,
|
||||||
'refresh_token': refresh_token,
|
'refresh_token': refresh_token,
|
||||||
@ -661,7 +661,6 @@ class MIoTHttpClient:
|
|||||||
raise MIoTHttpError('invalid response result')
|
raise MIoTHttpError('invalid response result')
|
||||||
return res_obj['result']
|
return res_obj['result']
|
||||||
|
|
||||||
|
|
||||||
async def __get_prop_async(self, did: str, siid: int, piid: int) -> any:
|
async def __get_prop_async(self, did: str, siid: int, piid: int) -> any:
|
||||||
results = await self.get_props_async(
|
results = await self.get_props_async(
|
||||||
params=[{'did': did, 'siid': siid, 'piid': piid}])
|
params=[{'did': did, 'siid': siid, 'piid': piid}])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user