From 9dac868b63c534da7253de93ba38134a1bed19a1 Mon Sep 17 00:00:00 2001 From: sworld Date: Sat, 21 Dec 2024 10:24:39 +0800 Subject: [PATCH] fix: fix miot cloud token refresh --- custom_components/xiaomi_home/miot/miot_cloud.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/custom_components/xiaomi_home/miot/miot_cloud.py b/custom_components/xiaomi_home/miot/miot_cloud.py index dd4c282..2d5c49c 100644 --- a/custom_components/xiaomi_home/miot/miot_cloud.py +++ b/custom_components/xiaomi_home/miot/miot_cloud.py @@ -204,7 +204,7 @@ async def refresh_access_token_async(self, refresh_token: str) -> dict: if not isinstance(refresh_token, str): raise MIoTOauthError('invalid refresh_token') - return await self._get_token_async(data={ + return await self.__get_token_async(data={ 'client_id': self._client_id, 'redirect_uri': self._redirect_url, 'refresh_token': refresh_token, @@ -661,7 +661,6 @@ async def get_props_async(self, params: list) -> list: raise MIoTHttpError('invalid response result') return res_obj['result'] - async def __get_prop_async(self, did: str, siid: int, piid: int) -> any: results = await self.get_props_async( params=[{'did': did, 'siid': siid, 'piid': piid}])