Browse Source

Add support for roaming between adapters while establishing the ble connection (#78)

J. Nick Koston 1 year ago
parent
commit
5459bbcbf6
2 changed files with 2 additions and 1 deletions
  1. 1 1
      setup.py
  2. 1 0
      switchbot/devices/device.py

+ 1 - 1
setup.py

@@ -3,7 +3,7 @@ from setuptools import setup
 setup(
     name="PySwitchbot",
     packages=["switchbot", "switchbot.devices", "switchbot.adv_parsers"],
-    install_requires=["async_timeout>=4.0.1", "bleak", "bleak-retry-connector>=1.7.2"],
+    install_requires=["async_timeout>=4.0.1", "bleak", "bleak-retry-connector>=1.10.0"],
     version="0.18.10",
     description="A library to communicate with Switchbot",
     author="Daniel Hjelseth Hoyer",

+ 1 - 0
switchbot/devices/device.py

@@ -164,6 +164,7 @@ class SwitchbotDevice:
                 self.name,
                 self._disconnected,
                 cached_services=self._cached_services,
+                ble_device_callback=lambda: self._device
             )
             self._cached_services = client.services
             _LOGGER.debug("%s: Connected; RSSI: %s", self.name, self.rssi)