mirror of
https://github.com/XiaoMi/ha_xiaomi_home.git
synced 2025-06-21 10:23:57 +08:00
refactor: refactor miot mips & fix type errors (#365)
* remove use of tev & fix type errors * lint fix * make private classes private * simplify inheritance * fix thread naming * fix the deleted public data class * remove tev * fix access violation * style: format code * style: param init * fix: fix event async set * fix: fix mips re-connect error --------- Co-authored-by: topsworld <sworldtop@gmail.com>
This commit is contained in:
@ -357,7 +357,7 @@ class MIoTClient:
|
||||
# Cloud mips
|
||||
self._mips_cloud.unsub_mips_state(
|
||||
key=f'{self._uid}-{self._cloud_server}')
|
||||
self._mips_cloud.disconnect()
|
||||
self._mips_cloud.deinit()
|
||||
# Cancel refresh cloud devices
|
||||
if self._refresh_cloud_devices_timer:
|
||||
self._refresh_cloud_devices_timer.cancel()
|
||||
@ -370,7 +370,7 @@ class MIoTClient:
|
||||
for mips in self._mips_local.values():
|
||||
mips.on_dev_list_changed = None
|
||||
mips.unsub_mips_state(key=mips.group_id)
|
||||
mips.disconnect()
|
||||
mips.deinit()
|
||||
if self._mips_local_state_changed_timers:
|
||||
for timer_item in (
|
||||
self._mips_local_state_changed_timers.values()):
|
||||
|
Reference in New Issue
Block a user