Skip to content

Commit 5c21e36

Browse files
committed
Disable protection
1 parent f06175a commit 5c21e36

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

plugwise_usb/nodes/circle.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1039,16 +1039,16 @@ def _calc_watts(self, pulses: int, seconds: int, nano_offset: int) -> float | No
10391039
)
10401040

10411041
# Fix minor miscalculations
1042-
if (
1043-
calc_value := corrected_pulses / PULSES_PER_KW_SECOND / seconds * (1000)
1044-
) >= 0.0:
1045-
return calc_value
1046-
_LOGGER.debug(
1047-
"Correct negative power %s to 0.0 for %s",
1048-
str(corrected_pulses / PULSES_PER_KW_SECOND / seconds * 1000),
1049-
self._mac_in_str,
1050-
)
1051-
return 0.0
1042+
# if (
1043+
calc_value = corrected_pulses / PULSES_PER_KW_SECOND / seconds * (1000)
1044+
# ) >= 0.0:
1045+
return calc_value
1046+
# _LOGGER.debug(
1047+
# "Correct negative power %s to 0.0 for %s",
1048+
# str(corrected_pulses / PULSES_PER_KW_SECOND / seconds * 1000),
1049+
# self._mac_in_str,
1050+
# )
1051+
# return 0.0
10521052

10531053
def _correct_power_pulses(self, pulses: int, offset: int) -> float:
10541054
"""Correct pulses based on given measurement time offset (ns)."""

0 commit comments

Comments
 (0)