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

fix(device): allow more retries for protocol 3.22

Protocol 3.22 needs more retries to latch onto the "device22" protocol properly.

Issue #5719
Jason Rumney 13 часов назад
Родитель
Сommit
803e3ba2ab
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      custom_components/tuya_local/device.py

+ 1 - 1
custom_components/tuya_local/device.py

@@ -658,7 +658,7 @@ class TuyaLocalDevice(object):
     async def _retry_on_failed_connection(self, func, error_message):
         if self._api_protocol_version_index is None:
             await self._rotate_api_protocol_version()
-        auto = (self._protocol_configured == "auto") and (
+        auto = (self._protocol_configured in ["auto", 3.22]) and (
             not self._api_protocol_working
         )
         connections = (