mirror of
https://github.com/XiaoMi/ha_xiaomi_home.git
synced 2025-09-13 17:53:32 +08:00
feat: subscribe the proxy gateway child device up messages even though the device is offline (#1393)
Some checks failed
Some checks failed
* feat: subscribe the proxy gateway child device up messages even though the device is offline (#1313) * feat: do not subscribe proxy gateway child device online/offline state message
This commit is contained in:
@ -998,9 +998,11 @@ class MipsCloudClient(_MipsClient):
|
||||
did, MIoTDeviceState.ONLINE if msg['event'] == 'online'
|
||||
else MIoTDeviceState.OFFLINE, ctx)
|
||||
|
||||
if did.startswith('blt.'):
|
||||
# MIoT cloud may not publish BLE device online/offline state message.
|
||||
# Do not subscribe BLE device online/offline state.
|
||||
if did.startswith('blt.') or did.startswith('proxy.'):
|
||||
# MIoT cloud may not publish BLE device or proxy gateway child device
|
||||
# online/offline state message.
|
||||
# Do not subscribe BLE device or proxy gateway child device
|
||||
# online/offline state.
|
||||
return True
|
||||
return self.__reg_broadcast_external(
|
||||
topic=topic, handler=on_state_msg, handler_ctx=handler_ctx)
|
||||
|
Reference in New Issue
Block a user