فهرست منبع

fix(device): check correct running flag

Jason Rumney 23 ساعت پیش
والد
کامیت
c779b64cd5
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  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