mirror of
https://github.com/XiaoMi/ha_xiaomi_home.git
synced 2026-01-17 15:22:12 +08:00
Merge 338911cfdb into 20b0004746
This commit is contained in:
commit
a2a78f4d45
@ -1307,7 +1307,7 @@ class MIoTLan:
|
|||||||
self._main_loop.call_soon_threadsafe(
|
self._main_loop.call_soon_threadsafe(
|
||||||
sub.handler, param, sub.handler_ctx)
|
sub.handler, param, sub.handler_ctx)
|
||||||
elif (
|
elif (
|
||||||
msg['method'] == 'event_occured'
|
msg['method'] == 'event_occurred'
|
||||||
and 'siid' in msg['params']
|
and 'siid' in msg['params']
|
||||||
and 'eiid' in msg['params']
|
and 'eiid' in msg['params']
|
||||||
):
|
):
|
||||||
|
|||||||
@ -920,9 +920,8 @@ class MipsCloudClient(_MipsClient):
|
|||||||
) -> bool:
|
) -> bool:
|
||||||
if not isinstance(did, str) or handler is None:
|
if not isinstance(did, str) or handler is None:
|
||||||
raise MIoTMipsError('invalid params')
|
raise MIoTMipsError('invalid params')
|
||||||
# Spelling error: event_occured
|
|
||||||
topic: str = (
|
topic: str = (
|
||||||
f'device/{did}/up/event_occured/'
|
f'device/{did}/up/event_occurred/'
|
||||||
f'{"#" if siid is None or eiid is None else f"{siid}/{eiid}"}')
|
f'{"#" if siid is None or eiid is None else f"{siid}/{eiid}"}')
|
||||||
|
|
||||||
def on_event_msg(topic: str, payload: str, ctx: Any) -> None:
|
def on_event_msg(topic: str, payload: str, ctx: Any) -> None:
|
||||||
@ -957,9 +956,8 @@ class MipsCloudClient(_MipsClient):
|
|||||||
) -> bool:
|
) -> bool:
|
||||||
if not isinstance(did, str):
|
if not isinstance(did, str):
|
||||||
raise MIoTMipsError('invalid params')
|
raise MIoTMipsError('invalid params')
|
||||||
# Spelling error: event_occured
|
|
||||||
topic: str = (
|
topic: str = (
|
||||||
f'device/{did}/up/event_occured/'
|
f'device/{did}/up/event_occurred/'
|
||||||
f'{"#" if siid is None or eiid is None else f"{siid}/{eiid}"}')
|
f'{"#" if siid is None or eiid is None else f"{siid}/{eiid}"}')
|
||||||
return self.__unreg_broadcast_external(topic=topic)
|
return self.__unreg_broadcast_external(topic=topic)
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user