We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 6e549f2 + f08890d commit 6c205f9Copy full SHA for 6c205f9
custom_components/solaredge_modbus_multi/helpers.py
@@ -14,7 +14,10 @@ def scale_factor(value: int, sf: int):
14
15
16
def float_to_hex(f):
17
- return hex(struct.unpack("<I", struct.pack("<f", f))[0])
+ try:
18
+ return hex(struct.unpack("<I", struct.pack("<f", f))[0])
19
+ except struct.error as e:
20
+ raise TypeError(e)
21
22
23
def parse_modbus_string(s: str) -> str:
0 commit comments