Explorar o código

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 %!s(int64=3) %!d(string=hai) anos
pai
achega
704e40c4bc
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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.
         self._FAKE_IT_TIL_YOU_MAKE_IT_TIMEOUT = 10
         self._CACHE_TIMEOUT = 20
-        self._CONNECTION_ATTEMPTS = 4
+        self._CONNECTION_ATTEMPTS = 9
         self._lock = Lock()
 
     @property