G3: F01 — remove asyncio.Future wrap from TCP connect()

TCPConnection.connect() returned a resolved asyncio.Future wrapping
self.host instead of the plain string.  ConnectionManager put this
Future directly into the CONNECTED event payload, which crashed any
downstream serializer (e.g. HA recorder's sanitize_event_data) that
tried to walk the payload dict.  BLE and serial already return plain
strings.  Fix: delete the Future creation and return self.host
directly.

Refs: Forensics report finding F01
This commit is contained in:
Matthew Wolter 2026-04-11 19:45:55 -07:00
parent fbf84cbdac
commit 47f6df4797

View file

@ -59,10 +59,7 @@ class TCPConnection:
)
logger.info("TCP Connection started")
future = asyncio.Future()
future.set_result(self.host)
return future
return self.host
def set_reader(self, reader):
self.reader = reader