From 417af787c4a7640ccb06f7a53199f43a5e422fa0 Mon Sep 17 00:00:00 2001 From: Necroneco Date: Fri, 28 Feb 2025 16:45:17 +0800 Subject: [PATCH] fix: some `event:motion-detected` does not contain `'arguments'` (#712) --- custom_components/xiaomi_home/miot/miot_mips.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/custom_components/xiaomi_home/miot/miot_mips.py b/custom_components/xiaomi_home/miot/miot_mips.py index 2187488..962eaad 100644 --- a/custom_components/xiaomi_home/miot/miot_mips.py +++ b/custom_components/xiaomi_home/miot/miot_mips.py @@ -1213,10 +1213,12 @@ class MipsLocalClient(_MipsClient): or 'did' not in msg or 'siid' not in msg or 'eiid' not in msg - or 'arguments' not in msg + # or 'arguments' not in msg ): # self.log_error(f'on_event_msg, recv unknown msg, {payload}') return + if 'arguments' not in msg: + msg['arguments'] = [] if handler: self.log_debug('local, on event_occurred, %s', payload) handler(msg, ctx)