From 121ce7cbe79e986301ee2ce3bafa362f296259d7 Mon Sep 17 00:00:00 2001 From: DanielR92 Date: Thu, 30 Jun 2022 09:31:19 +0200 Subject: [PATCH] Update __init__.py (short one line) Use the function 'hexify_payload()' in other lines --- tools/rpi/hoymiles/__init__.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/rpi/hoymiles/__init__.py b/tools/rpi/hoymiles/__init__.py index ada9a6ef..ed1bcdd3 100644 --- a/tools/rpi/hoymiles/__init__.py +++ b/tools/rpi/hoymiles/__init__.py @@ -263,8 +263,7 @@ class InverterPacketFragment: c_datetime = self.time_rx.strftime("%Y-%m-%d %H:%M:%S.%f") size = len(self.frame) channel = f' channel {self.ch_rx}' if self.ch_rx else '' - raw = " ".join([f"{b:02x}" for b in self.frame]) - return f"{c_datetime} Received {size} bytes{channel}: {raw}" + return f"{c_datetime} Received {size} bytes{channel}: {hexify_payload(self.frame)}" class HoymilesNRF: """Hoymiles NRF24 Interface"""