mirror of
https://github.com/XiaoMi/ha_xiaomi_home.git
synced 2025-06-21 15:20:00 +08:00
feat: support devices filter & devices changed notify (#332)
* feat: add devices filter page * doc: update translations and i18n * fix: cancel miot http timer * feat: improve devices filter * doc: update translations/de * fix: i18n type error * feat: config flow support device filter * fix: fix mdns type error * fix: fix miot client i18n logic * feat: add connect type * doc: update translations and i18n * feat: update auth info save logic * feat: improve config flow devices filter * fix: fix some type error * doc: update translations for option flow * fix: fix option flow type error * feat: support option flow devices filter * doc: update option flow tranlations * feat: update webhook handle func to private * feat: update config flow translations * doc: update tranlations text * feat: custom display device changed notify * feat: device changed notify logical refinement * doc: update translations content
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user