feat: subscribe the BLE device up messages even though the device is offline (#1207)
Some checks failed
Tests / check-rule-format (push) Failing after 10s
Validate / validate-hassfest (push) Failing after 5s
Validate / validate-hacs (push) Failing after 11s
Validate / validate-lint (push) Failing after 4s
Validate / validate-setup (push) Failing after 5s

* feat: subscribe the BLE device up messages even though the device is offline (#1170)

* fix: set all BLE devices online
This commit is contained in:
Li Shuzhen
2025-06-30 11:27:12 +08:00
committed by GitHub
parent 6069eaaba8
commit 5b1d003bb2

View File

@ -1354,6 +1354,11 @@ class MIoTClient:
"""Update cloud devices.
NOTICE: This function will operate the cloud_list
"""
# MIoT cloud service may not publish the online state updating message
# for the BLE device. Assume that all BLE devices are online.
for did, info in cloud_list.items():
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:
continue