mirror of
https://github.com/XiaoMi/ha_xiaomi_home.git
synced 2026-01-11 11:20:43 +08:00
fixbug
This commit is contained in:
parent
4c7b6d570d
commit
f5bc880c62
@ -716,7 +716,7 @@ class MIoTClient:
|
||||
# props_list = [{'did': str, 'siid': int, 'piid': int, 'value': Any}......]
|
||||
# 判断是不是只有一个did
|
||||
did_set = {prop["did"] for prop in props_list}
|
||||
if len(did_set) == 1:
|
||||
if len(did_set) != 1:
|
||||
raise MIoTClientError(f"more than one or no did once, {did_set}")
|
||||
did = did_set.pop()
|
||||
|
||||
|
||||
@ -922,7 +922,6 @@ class MIoTLan:
|
||||
async def __call_api_async(
|
||||
self, did: str, msg: dict, timeout_ms: int = 10000
|
||||
) -> dict:
|
||||
|
||||
def call_api_handler(msg: dict, fut: asyncio.Future):
|
||||
self._main_loop.call_soon_threadsafe(
|
||||
fut.set_result, msg)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user