Skip to content

Commit

Permalink
workaround for non-standard smart response, ref #109
Browse files Browse the repository at this point in the history
  • Loading branch information
tomaae committed Apr 25, 2023
1 parent da3e3a8 commit 9f6c75d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions custom_components/openmediavault/apiparser.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@ def from_entry(entry, param, default="") -> str:
if isinstance(default, str):
ret = str(ret)
elif isinstance(default, int):
if " " in ret:
if isinstance(default, str) and " " in ret:
ret_tmp = ret.split(" ")
ret = ret_tmp[0]

ret = int(ret)
elif isinstance(default, float):
if " " in ret:
if isinstance(default, str) and " " in ret:
ret_tmp = ret.split(" ")
ret = ret_tmp[0]

Expand Down

0 comments on commit 9f6c75d

Please sign in to comment.