From 15edff86a34456d19d5e4cf57252205b82c2b2cb Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Tue, 3 Jan 2023 12:40:17 -1000 Subject: [PATCH] Log the packet type when we get an invalid protobuf message (#343) --- aioesphomeapi/connection.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/aioesphomeapi/connection.py b/aioesphomeapi/connection.py index 32db90f..4c96fc5 100644 --- a/aioesphomeapi/connection.py +++ b/aioesphomeapi/connection.py @@ -583,8 +583,9 @@ class APIConnection: msg.ParseFromString(pkt.data) except Exception as e: _LOGGER.info( - "%s: Invalid protobuf message: %s: %s", + "%s: Invalid protobuf message: type=%s data=%s: %s", self.log_name, + pkt.type, pkt.data, e, exc_info=True,