From a985448b89d8dd1f1878f412f95f0d1a1b9288b2 Mon Sep 17 00:00:00 2001 From: nao-pon Date: Sat, 24 Feb 2024 23:18:25 +0900 Subject: [PATCH] Fixed incorrect judgment of batch max size automatic adjustment --- custom_components/echonetlite/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/echonetlite/__init__.py b/custom_components/echonetlite/__init__.py index e80c1be..fb0a32f 100644 --- a/custom_components/echonetlite/__init__.py +++ b/custom_components/echonetlite/__init__.py @@ -488,7 +488,7 @@ async def async_update(self, **kwargs): MIN_UPDATE_BATCH_SIZE, self._user_options[CONF_BATCH_SIZE_MAX] - 1, ) - if batch_data_len <= self._user_options[CONF_BATCH_SIZE_MAX]: + if batch_data_len >= self._user_options[CONF_BATCH_SIZE_MAX]: _LOGGER.error( f"The integration has adjusted the number of batch requests to {self._host} to {self._user_options[CONF_BATCH_SIZE_MAX]}, but no response is received. Please check and try restarting the device etc." )