diff --git a/custom_components/solarman/api.py b/custom_components/solarman/api.py index ddd06e6..1ef5075 100644 --- a/custom_components/solarman/api.py +++ b/custom_components/solarman/api.py @@ -191,7 +191,7 @@ async def wait_for_reading_done(self, attempts_left = ACTION_ATTEMPTS): while self._is_reading == 1 and attempts_left > 0: attempts_left -= 1 - await asyncio.sleep(TIMINGS_WAIT_SLEEP) + await asyncio.sleep(TIMINGS_WAIT_FOR_SLEEP) return self._is_reading == 1 diff --git a/custom_components/solarman/const.py b/custom_components/solarman/const.py index e8c09d3..128fdb6 100644 --- a/custom_components/solarman/const.py +++ b/custom_components/solarman/const.py @@ -50,6 +50,7 @@ TIMINGS_UPDATE_TIMEOUT = TIMINGS_INTERVAL * 6 TIMINGS_SOCKET_TIMEOUT = TIMINGS_INTERVAL * 4 - 1 TIMINGS_WAIT_SLEEP = 0.2 +TIMINGS_WAIT_FOR_SLEEP = 1 ATTR_FRIENDLY_NAME = "friendly_name"