Executing the following test script fails with TypeError: can't multiply sequence by non-int of type 'float'
import oekofen_api
import time
client = oekofen_api.Oekofen("<ip address>", "<password>")
#client.update_csv_data()
x = client.update_data()
_fetch_data using urllib.request.urlopen http://<ip address>:4321/<password>/all?
Traceback (most recent call last):
File "/Users/carl/Downloads/oekofen-api/test.py", line 6, in <module>
x = client.update_data()
^^^^^^^^^^^^^^^^^^^^
File "/Users/carl/Downloads/oekofen-api/oekofen_api/__init__.py", line 89, in update_data
att_rendered_value = self._get_value(
^^^^^^^^^^^^^^^^
File "/Users/carl/Downloads/oekofen-api/oekofen_api/__init__.py", line 214, in _get_value
return attribute_instance.get_value()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/carl/Downloads/oekofen-api/oekofen_api/__init__.py", line 356, in get_value
v = value * self.factor
~~~~~~^~~~~~~~~~~~~
TypeError: can't multiply sequence by non-int of type 'float'
oekofen api v0.0.22 Oekofen CONDENS V4.00b
Executing the following test script fails with TypeError: can't multiply sequence by non-int of type 'float'
https://github.com/ckarrie/oekofen-api/blob/main/oekofen_api/__init__.py#L356
Changing line 356 to
v = float(value) * self.factor
resolves the issue (in my environment).