ソースを参照

let the lib handle the disconnect

J. Nick Koston 1 年間 前
コミット
347451f86e
1 ファイル変更1 行追加1 行削除
  1. 1 1
      switchbot/devices/device.py

+ 1 - 1
switchbot/devices/device.py

@@ -375,7 +375,7 @@ class SwitchbotBaseDevice:
         self._client = None
         self._read_char = None
         self._write_char = None
-        if client and client.is_connected:
+        if client:
             _LOGGER.debug("%s: Disconnecting", self.name)
             await client.disconnect()
             _LOGGER.debug("%s: Disconnect completed", self.name)