mirror of
https://github.com/tiqi-group/pydase.git
synced 2025-06-05 05:00:40 +02:00
__convert_value_if_needed now also converts to float if needed
This commit is contained in:
parent
5378396958
commit
c3c1669cf9
@ -220,6 +220,8 @@ class StateManager:
|
||||
) -> Any:
|
||||
if current_value_dict["type"] == "Quantity":
|
||||
return u.convert_to_quantity(value, current_value_dict["value"]["unit"])
|
||||
if current_value_dict["type"] == "float" and not isinstance(value, float):
|
||||
return float(value)
|
||||
return value
|
||||
|
||||
def __update_attribute_by_path(self, path: str, value: Any) -> None:
|
||||
|
Loading…
x
Reference in New Issue
Block a user