This commit is contained in:
Ikko Eltociear Ashimine 2025-02-25 10:38:30 +09:00 committed by GitHub
commit 81472a9bd9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 5 deletions

View File

@ -1307,7 +1307,7 @@ class MIoTLan:
self._main_loop.call_soon_threadsafe(
sub.handler, param, sub.handler_ctx)
elif (
msg['method'] == 'event_occured'
msg['method'] == 'event_occurred'
and 'siid' in msg['params']
and 'eiid' in msg['params']
):

View File

@ -920,9 +920,8 @@ class MipsCloudClient(_MipsClient):
) -> bool:
if not isinstance(did, str) or handler is None:
raise MIoTMipsError('invalid params')
# Spelling error: event_occured
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}"}')
def on_event_msg(topic: str, payload: str, ctx: Any) -> None:
@ -957,9 +956,8 @@ class MipsCloudClient(_MipsClient):
) -> bool:
if not isinstance(did, str):
raise MIoTMipsError('invalid params')
# Spelling error: event_occured
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}"}')
return self.__unreg_broadcast_external(topic=topic)