Skip to content

Commit e14e061

Browse files
Update helpers.py
1 parent 603ec93 commit e14e061

File tree

1 file changed

+3
-1
lines changed
  • custom_components/solaredge_modbus_multi

1 file changed

+3
-1
lines changed

custom_components/solaredge_modbus_multi/helpers.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ def watts_to_kilowatts(value):
88
return round(value * 0.001, 3)
99

1010
def parse_modbus_string(s: str) -> str:
11-
return s.decode(encoding="utf-8", errors="ignore").replace("\x00", "").rstrip()
11+
s = s.decode(encoding="utf-8", errors="ignore")
12+
s = s.replace("\x00", "").rstrip()
13+
return str(s)
1214

1315
def update_accum(self, accum_value: int) -> None:
1416

0 commit comments

Comments
 (0)