فهرست منبع

Retry more before giving up.

Previously 4 retries got us through both protocol versions twice, but from observation it was still sometimes possible for a device to become stuck offline.
Now that there are three protocol versions, 4 retries is not enough.
Jason Rumney 3 سال پیش
والد
کامیت
704e40c4bc
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      custom_components/tuya_local/device.py

+ 1 - 1
custom_components/tuya_local/device.py

@@ -55,7 +55,7 @@ class TuyaLocalDevice(object):
         # its switches.
         # its switches.
         self._FAKE_IT_TIL_YOU_MAKE_IT_TIMEOUT = 10
         self._FAKE_IT_TIL_YOU_MAKE_IT_TIMEOUT = 10
         self._CACHE_TIMEOUT = 20
         self._CACHE_TIMEOUT = 20
-        self._CONNECTION_ATTEMPTS = 4
+        self._CONNECTION_ATTEMPTS = 9
         self._lock = Lock()
         self._lock = Lock()
 
 
     @property
     @property