Ver Fonte

let the lib handle the disconnect

J. Nick Koston há 2 anos atrás
pai
commit
347451f86e
1 ficheiros alterados com 1 adições e 1 exclusões
  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)