Added Alarm LEDs

This commit is contained in:
Martin Bauer
2019-12-02 21:22:02 +01:00
parent 23d55ddf7a
commit 0b1a2e54b9
3 changed files with 10 additions and 4 deletions

View File

@@ -50,7 +50,7 @@ class ReconnectingClient:
try:
reader, writer = await asyncio.open_connection(self._host, self._port)
self._connection_last_state = 'CONNECTED'
_LOGGER.debug(f"{self._connection_name} starting connection")
self._writer = writer
self.connected = True
await self._connection_status_changed_callback('connected')
@@ -61,6 +61,7 @@ class ReconnectingClient:
if not line:
raise OSError("Disconnect")
line = line.decode()
_LOGGER.debug(f"{self._connection_name} received line - passing along '{line}'")
await self._receive_line_callback(line)
except OSError as e:
if self._connection_last_state != 'FAILED':