Skip to content

Commit

Permalink
fixing retrieve_data_from_current whcih should return nvalue and svalue
Browse files Browse the repository at this point in the history
  • Loading branch information
pipiche38 committed Nov 29, 2023
1 parent db29d43 commit 7e7837a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Modules/domoMaj.py
Original file line number Diff line number Diff line change
Expand Up @@ -1566,17 +1566,17 @@ def retrieve_data_from_current(self, Devices, DeviceID, Unit, _format):
>>> retrieve_data_from_current(self, "Device1", 123, 1, "A;B;C")
['0', '0', '0']
"""
_, currentsValue = domo_read_nValue_sValue(self, Devices, DeviceID, Unit)
current_nvalue, current_svalue = domo_read_nValue_sValue(self, Devices, DeviceID, Unit)

nb_parameters = len(_format.split(";"))
currents_values = currentsValue.split(";")
currents_values = current_svalue.split(";")

if len(currents_values) != nb_parameters:
currents_values = ["0"] * nb_parameters

self.log.logging("Widget", "Debug", f"retrieve_data_from_current - Nb Param: {nb_parameters} returning {currents_values}")

return currents_values
return current_nvalue, current_svalue


def normalized_lvl_value( self, Devices, DeviceID, DeviceUnit, value ):
Expand Down

0 comments on commit 7e7837a

Please sign in to comment.