diff --git a/custom_components/openmediavault/apiparser.py b/custom_components/openmediavault/apiparser.py index 6116c70..380b4d0 100644 --- a/custom_components/openmediavault/apiparser.py +++ b/custom_components/openmediavault/apiparser.py @@ -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]