Skip to content

Commit 6512e06

Browse files
committed
feat: do not subscribe proxy gateway child device online/offline state message
1 parent f9f1611 commit 6512e06

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

custom_components/xiaomi_home/miot/miot_mips.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -998,9 +998,11 @@ def on_state_msg(topic: str, payload: str, ctx: Any) -> None:
998998
did, MIoTDeviceState.ONLINE if msg['event'] == 'online'
999999
else MIoTDeviceState.OFFLINE, ctx)
10001000

1001-
if did.startswith('blt.'):
1002-
# MIoT cloud may not publish BLE device online/offline state message.
1003-
# Do not subscribe BLE device online/offline state.
1001+
if did.startswith('blt.') or did.startswith('proxy.'):
1002+
# MIoT cloud may not publish BLE device or proxy gateway child device
1003+
# online/offline state message.
1004+
# Do not subscribe BLE device or proxy gateway child device
1005+
# online/offline state.
10041006
return True
10051007
return self.__reg_broadcast_external(
10061008
topic=topic, handler=on_state_msg, handler_ctx=handler_ctx)

0 commit comments

Comments
 (0)