Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
paresy committed Jul 23, 2023
1 parent 8a8bdcb commit 9024cba
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions VerbrauchInKategorie/module.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public function RequestAction($Ident, $Value)
$this->CalculateConsumption();
break;
default:
$this->SendDebug($Ident, 'You try to set an automatic variable', 0);
$this->SendDebug($Ident, strval('You try to set an automatic variable'), 0);
break;
}
}
Expand Down Expand Up @@ -131,12 +131,12 @@ public function CalculateConsumption()
foreach ($sourceVariables as &$row) {
$loggedValue = AC_GetAggregatedValues($archiveID, $row['SourceVariable'], 1 /*Daily*/, $startTime, $endTime, 0);
$row['Value'] = array_sum(array_column($loggedValue, 'Avg'));
$this->SendDebug('Sum of ' . $row['SourceVariable'], $row['Value'], 0);
$this->SendDebug('Sum of ' . $row['SourceVariable'], strval($row['Value']), 0);
}

// calculate the total
$totalConsumption = array_sum(array_column($sourceVariables, 'Value'));
$this->SendDebug('Total Consumption', $totalConsumption, 0);
$this->SendDebug('Total Consumption', strval($totalConsumption), 0);

// calculate values per category
$categories = [];
Expand Down

0 comments on commit 9024cba

Please sign in to comment.