Skip to content

Commit 30c7cc4

Browse files
committed
Use absolute intermediate power watts
Intermediate meters measure consumption, so those are often negative. This uses the absolute value, assuming that an intermediate meter would never measure a consumer and a producer simultaneously.
1 parent b587cdf commit 30c7cc4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

HoymilesZeroExport.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ def GetHoymilesTemperature():
365365
def GetHoymilesActualPower():
366366
try:
367367
try:
368-
Watts = INTERMEDIATE_POWERMETER.GetPowermeterWatts()
368+
Watts = abs(INTERMEDIATE_POWERMETER.GetPowermeterWatts())
369369
logger.info(f"intermediate meter {INTERMEDIATE_POWERMETER.__class__.__name__}: {Watts} Watt")
370370
return Watts
371371
except Exception as e:

0 commit comments

Comments
 (0)