소스 검색

fix(device): bump socketRetryLimit back to 1

0 retries leads to complete failure to communicate. It seems devices
need at least 1 retry to get the initial connection started.
Jason Rumney 5 일 전
부모
커밋
2a0a0356a1
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      custom_components/tuya_local/device.py

+ 2 - 2
custom_components/tuya_local/device.py

@@ -127,10 +127,10 @@ class TuyaLocalDevice(object):
             raise e
             raise e
 
 
         # we handle retries at a higher level so we can rotate protocol version
         # we handle retries at a higher level so we can rotate protocol version
-        self._api.set_socketRetryLimit(0)
+        self._api.set_socketRetryLimit(1)
         if self._api.parent:
         if self._api.parent:
             # Retries cause problems for other children of the parent device
             # Retries cause problems for other children of the parent device
-            self._api.parent.set_socketRetryLimit(0)
+            self._api.parent.set_socketRetryLimit(1)
 
 
         self._refresh_task = None
         self._refresh_task = None
         self._protocol_configured = protocol_version
         self._protocol_configured = protocol_version