mirror of
https://github.com/XiaoMi/ha_xiaomi_home.git
synced 2026-01-14 05:10:44 +08:00
fix: i18n type error
This commit is contained in:
parent
e0a0b6d22e
commit
96b5084092
@ -71,7 +71,7 @@ class MIoTI18n:
|
||||
) -> None:
|
||||
self._main_loop = loop or asyncio.get_event_loop()
|
||||
self._lang = lang
|
||||
self._data = None
|
||||
self._data = {}
|
||||
|
||||
async def init_async(self) -> None:
|
||||
if self._data:
|
||||
@ -94,7 +94,7 @@ class MIoTI18n:
|
||||
self._data = data
|
||||
|
||||
async def deinit_async(self) -> None:
|
||||
self._data = None
|
||||
self._data = {}
|
||||
|
||||
def translate(
|
||||
self, key: str, replace: Optional[dict[str, str]] = None
|
||||
|
||||
Loading…
Reference in New Issue
Block a user