Skip to content

Commit

Permalink
Fix calulation of 1st consumption value in Accumulator
Browse files Browse the repository at this point in the history
  • Loading branch information
K-Ko committed Sep 13, 2014
1 parent 0af22c5 commit 91257e4
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/Channel/Accumulator.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public function read( $request ) {
$row1['data'] += $row2['data'];
$row1['min'] += $row2['min'];
$row1['max'] += $row2['max'];
$row1['consumption'] = $lastRow ? $row1['data'] - $lastRow['data'] : 0;
$row1['consumption'] = $lastRow ? $row1['data'] - $lastRow['data'] : $row1['data'];

$result->write($row1, $key1);
$lastRow = $row1;
Expand Down
Binary file added public/images/ico/solar-panel.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 91257e4

Please sign in to comment.