Compare commits

..

2 Commits

Author SHA1 Message Date
ohyeah521
714d55eb4c
Merge 64d9d54170 into ec833b6539 2025-09-02 18:41:42 +08:00
Li Shuzhen
ec833b6539
feat: subscribe the proxy gateway child device up messages even though the device is offline (#1393)
Some checks failed
Tests / check-rule-format (push) Has been cancelled
Validate / validate-hassfest (push) Has been cancelled
Validate / validate-hacs (push) Has been cancelled
Validate / validate-lint (push) Has been cancelled
Validate / validate-setup (push) Has been cancelled
* 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
2025-09-02 17:22:40 +08:00
2 changed files with 10 additions and 5 deletions

View File

@ -1374,10 +1374,13 @@ class MIoTClient:
"""Update cloud devices.
NOTICE: This function will operate the cloud_list
"""
# MIoT cloud service may not publish the online state updating message
# MIoT cloud 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.'):
if did.startswith('blt.') or did.startswith('proxy.'):
info['online'] = True
for did, info in self._device_list_cache.items():
if filter_dids and did not in filter_dids:

View File

@ -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)