Просмотр исходного кода

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 дней назад
Родитель
Сommit
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
 
         # 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:
             # 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._protocol_configured = protocol_version