fix: fix miot client i18n logic

This commit is contained in:
sworld 2024-12-22 23:40:45 +08:00
parent 8c0461e88c
commit ff5e4c7ab1

View File

@ -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,