Skip to content

Commit 200b83f

Browse files
authored
Sleep 1s before retrying connection
1 parent 950ee0c commit 200b83f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

custom_components/eurotronic_cometblue/coordinator.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
from __future__ import annotations
44

5+
import asyncio
56
from datetime import timedelta
67
import logging
78
from typing import Any
@@ -86,6 +87,7 @@ async def send_command(
8687
type(ex).__name__,
8788
ex,
8889
)
90+
await asyncio.sleep(1)
8991
except ValueError as ex:
9092
raise ServiceValidationError(
9193
f"Invalid payload '{payload}' for '{caller_entity_id}': {ex}"
@@ -140,6 +142,7 @@ async def _async_update_data(self) -> dict[str, bytes]:
140142
type(ex).__name__,
141143
ex,
142144
)
145+
await asyncio.sleep(1)
143146
except Exception as ex:
144147
raise UpdateFailed(f"({type(ex).__name__}) {ex}") from ex
145148

0 commit comments

Comments
 (0)