diff --git a/platypush/plugins/bluetooth/_ble/_event_handler.py b/platypush/plugins/bluetooth/_ble/_event_handler.py index 6a679a86..3beedfee 100644 --- a/platypush/plugins/bluetooth/_ble/_event_handler.py +++ b/platypush/plugins/bluetooth/_ble/_event_handler.py @@ -183,6 +183,7 @@ class EventHandler: get_bus().post(event) if events: + new_entity.reachable = True self._device_queue.put_nowait(new_entity) @staticmethod diff --git a/platypush/plugins/bluetooth/_cache.py b/platypush/plugins/bluetooth/_cache.py index 4c6923b4..02c75903 100644 --- a/platypush/plugins/bluetooth/_cache.py +++ b/platypush/plugins/bluetooth/_cache.py @@ -176,6 +176,10 @@ class EntityCache(BaseCache): if getattr(existing_device, attr, None) is None: setattr(existing_device, attr, getattr(device, attr, None)) + # Coalesce the reachable flag + if device.reachable is not None: + existing_device.reachable = device.reachable + # Merge the data and meta dictionaries for attr in ('data', 'meta'): setattr(