Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions aiocomfoconnect/comfoconnect.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
from aiocomfoconnect.exceptions import (
AioComfoConnectNotConnected,
AioComfoConnectTimeout,
ComfoConnectNotAllowed,
)
from aiocomfoconnect.properties import Property
from aiocomfoconnect.sensors import Sensor
Expand Down Expand Up @@ -113,6 +114,11 @@ async def _reconnect_loop():
# Reconnect when connection has been dropped
_LOGGER.info("We got disconnected. Reconnecting.")

except ComfoConnectNotAllowed as exception:
# Passthrough exception if not allowed (because not registered uuid for example )
connected.set_exception(exception)
return

reconnect_task = self._loop.create_task(_reconnect_loop())
self._tasks.add(reconnect_task)
reconnect_task.add_done_callback(self._tasks.discard)
Expand Down
Loading