mirror of
https://github.com/XiaoMi/ha_xiaomi_home.git
synced 2026-01-16 06:30:44 +08:00
Compare commits
1 Commits
714d55eb4c
...
6ecffbb47a
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6ecffbb47a |
@ -1374,13 +1374,10 @@ class MIoTClient:
|
||||
"""Update cloud devices.
|
||||
NOTICE: This function will operate the cloud_list
|
||||
"""
|
||||
# MIoT cloud may not publish the online state updating message
|
||||
# MIoT cloud service may not publish the online state updating message
|
||||
# for the BLE device. Assume that all BLE devices are online.
|
||||
# MIoT cloud does not publish the online state updating message for the
|
||||
# child device under the proxy gateway (eg, VRF air conditioner
|
||||
# controller). Assume that all proxy gateway child devices are online.
|
||||
for did, info in cloud_list.items():
|
||||
if did.startswith('blt.') or did.startswith('proxy.'):
|
||||
if did.startswith('blt.'):
|
||||
info['online'] = True
|
||||
for did, info in self._device_list_cache.items():
|
||||
if filter_dids and did not in filter_dids:
|
||||
|
||||
@ -998,11 +998,9 @@ class MipsCloudClient(_MipsClient):
|
||||
did, MIoTDeviceState.ONLINE if msg['event'] == 'online'
|
||||
else MIoTDeviceState.OFFLINE, ctx)
|
||||
|
||||
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.
|
||||
if did.startswith('blt.'):
|
||||
# MIoT cloud may not publish BLE device online/offline state message.
|
||||
# Do not subscribe BLE device online/offline state.
|
||||
return True
|
||||
return self.__reg_broadcast_external(
|
||||
topic=topic, handler=on_state_msg, handler_ctx=handler_ctx)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user