fix: fix miot cloud token refresh (#307)

This commit is contained in:
Paul Shawn 2024-12-21 10:42:48 +08:00 committed by GitHub
parent 67785f747a
commit f87e746188
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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}])