소스 검색

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.
         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