Fix DSMR reconnecting loop without timeout (#53722)

This commit is contained in:
Franck Nijhof
2021-07-29 22:55:26 +02:00
committed by Paulus Schoutsen
parent 6dc00d3d87
commit f1400b03bb

View File

@@ -165,6 +165,9 @@ async def async_setup_entry(
LOGGER.exception("Error connecting to DSMR")
transport = None
protocol = None
# throttle reconnect attempts
await asyncio.sleep(entry.data[CONF_RECONNECT_INTERVAL])
except CancelledError:
if stop_listener:
stop_listener() # pylint: disable=not-callable