From 0e244888d60cc52c6897f72a6b07cbe998295e59 Mon Sep 17 00:00:00 2001 From: Simone Chemelli Date: Thu, 3 Oct 2024 08:07:11 +0000 Subject: [PATCH] chore: add debug logging to MessageResponse --- midealocal/message.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/midealocal/message.py b/midealocal/message.py index ce841038..6f82a34b 100644 --- a/midealocal/message.py +++ b/midealocal/message.py @@ -573,11 +573,14 @@ def __init__(self, message: bytearray) -> None: super().__init__() if message is None or len(message) < self.HEADER_LENGTH + 1: raise MessageLenError + _LOGGER.debug("MessageResponse - message: %s", message) self._header = message[: self.HEADER_LENGTH] + _LOGGER.debug("MessageResponse - header: %s", self._header) self.protocol_version = self._header[-2] self.message_type = MessageType(self._header[-1]) self.device_type = DeviceType(self._header[2]) body = message[self.HEADER_LENGTH : -1] + _LOGGER.debug("MessageResponse - body : %s", body) self._body = MessageBody(body) self.body_type = self._body.body_type