From 9a78f3205e130dca3aa2009b77a375c696a30593 Mon Sep 17 00:00:00 2001 From: topsworld Date: Tue, 17 Dec 2024 16:00:34 +0800 Subject: [PATCH] fix: mips msg id type parse --- custom_components/xiaomi_home/miot/miot_mips.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/custom_components/xiaomi_home/miot/miot_mips.py b/custom_components/xiaomi_home/miot/miot_mips.py index cbe41cf..a91f1ba 100644 --- a/custom_components/xiaomi_home/miot/miot_mips.py +++ b/custom_components/xiaomi_home/miot/miot_mips.py @@ -105,8 +105,7 @@ def unpack(data: bytes): # string end with \x00 match unpack_type: case MipsMsgTypeOptions.ID.value: - mips_msg.mid = int.from_bytes( - unpack_data, byteorder='little') + mips_msg.mid = struct.unpack('