Parcourir la source

return correct value from switchbot

Daniel Høyer Iversen il y a 5 ans
Parent
commit
51b43c2522
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      switchbot/__init__.py

+ 1 - 1
switchbot/__init__.py

@@ -31,7 +31,7 @@ class Switchbot:
             _LOGGER.error("Cannot connect to switchbot.", exc_info=True)
             if retry < 1:
                 return False
-            self._sendpacket(key, retry-1)
+            return self._sendpacket(key, retry-1)
         return True
 
     def turn_on(self) -> None: