From f08890d16442cb950810d89fdb4f3cc195a5915a Mon Sep 17 00:00:00 2001 From: WillCodeForCats <48533968+WillCodeForCats@users.noreply.github.com> Date: Tue, 14 Nov 2023 20:29:58 -0800 Subject: [PATCH] Raise TypeError from struct.error in helper --- custom_components/solaredge_modbus_multi/helpers.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/custom_components/solaredge_modbus_multi/helpers.py b/custom_components/solaredge_modbus_multi/helpers.py index 0a370ed9..a7e07d7c 100644 --- a/custom_components/solaredge_modbus_multi/helpers.py +++ b/custom_components/solaredge_modbus_multi/helpers.py @@ -14,7 +14,10 @@ def scale_factor(value: int, sf: int): def float_to_hex(f): - return hex(struct.unpack(" str: