From ff5e4c7ab1449be014bc7d67c9a29e47d16c984c Mon Sep 17 00:00:00 2001 From: sworld Date: Sun, 22 Dec 2024 23:40:45 +0800 Subject: [PATCH] fix: fix miot client i18n logic --- custom_components/xiaomi_home/miot/miot_client.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/custom_components/xiaomi_home/miot/miot_client.py b/custom_components/xiaomi_home/miot/miot_client.py index da8e2b6..1346b63 100644 --- a/custom_components/xiaomi_home/miot/miot_client.py +++ b/custom_components/xiaomi_home/miot/miot_client.py @@ -239,14 +239,14 @@ class MIoTClient: # Integration need to be add again raise MIoTClientError('load_user_config_async error') _LOGGER.debug('user config, %s', json.dumps(self._user_config)) - # Load cache device list - await self.__load_cache_device_async() # MIoT i18n client self._i18n = MIoTI18n( lang=self._entry_data.get( 'integration_language', DEFAULT_INTEGRATION_LANGUAGE), loop=self._main_loop) await self._i18n.init_async() + # Load cache device list + await self.__load_cache_device_async() # MIoT oauth client instance self._oauth = MIoTOauthClient( client_id=OAUTH2_CLIENT_ID,