Skip to content

Commit

Permalink
Improved logging
Browse files Browse the repository at this point in the history
  • Loading branch information
alexdelprete committed Feb 6, 2024
1 parent e56f71e commit 5df3285
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions custom_components/abb_powerone_pvi_sunspec/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -611,10 +611,13 @@ def read_sunspec_modbus_model_160(self):
dc1power = self.calculate_value(dc1power, dcwsf)
self.data["dc1power"] = round(dc1power, abs(dcwsf))
_LOGGER.debug(
f"(read_rt_160) dc1curr: {dc1curr} Round: {self.data["dc1curr"]} SF: {dcasf}"
"(read_rt_160) dc1curr: %s Round: %s SF: %s",
dc1curr,
self.data["dc1curr"],
dcasf,
)
_LOGGER.debug("(read_rt_160) dc1volt %d", self.data["dc1volt"])
_LOGGER.debug("(read_rt_160) dc1power %d", self.data["dc1power"])
_LOGGER.debug("(read_rt_160) dc1volt %s", self.data["dc1volt"])
_LOGGER.debug("(read_rt_160) dc1power %s", self.data["dc1power"])

# if we have more than one DC module
if multi_mppt_nr > 1:
Expand All @@ -632,7 +635,10 @@ def read_sunspec_modbus_model_160(self):
dc2power = self.calculate_value(dc2power, dcwsf)
self.data["dc2power"] = round(dc2power, abs(dcwsf))
_LOGGER.debug(
f"(read_rt_160) dc2curr: {dc2curr} Round: {self.data["dc2curr"]} SF: {dcasf}"
"(read_rt_160) dc2curr: %s Round: %s SF: %s",
dc2curr,
self.data["dc2curr"],
dcasf,
)
_LOGGER.debug("(read_rt_160) dc2volt %s", self.data["dc2volt"])
_LOGGER.debug("(read_rt_160) dc2power %s", self.data["dc2power"])
Expand Down

0 comments on commit 5df3285

Please sign in to comment.