Sfoglia il codice sorgente

fix(device): check correct running flag

Jason Rumney 23 ore fa
parent
commit
c779b64cd5
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      custom_components/tuya_local/device.py

+ 1 - 1
custom_components/tuya_local/device.py

@@ -468,7 +468,7 @@ class TuyaLocalDevice(object):
 
             if not self.has_returned_state or wifi_api.socket is None:
                 force_backoff = True
-            if self.running:
+            if self._running:
                 await asyncio.sleep(5 if force_backoff else 0.1)
 
         # Close the persistent connection when exiting the loop