Przeglądaj źródła

fix(device): check correct running flag

Jason Rumney 23 godzin temu
rodzic
commit
c779b64cd5
1 zmienionych plików z 1 dodań i 1 usunięć
  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