no message
This commit is contained in:
@@ -100,16 +100,17 @@ private function RecalculateAndPush(): void
|
||||
|
||||
[$tStart, $tEnd] = $this->getRange($range, $date);
|
||||
|
||||
// Archiv-Deltas
|
||||
$prod = $this->readDelta($this->ReadPropertyInteger('VarProduction'), $tStart, $tEnd);
|
||||
$feed = $this->readDelta($this->ReadPropertyInteger('VarFeedIn'), $tStart, $tEnd);
|
||||
$grid = $this->readDelta($this->ReadPropertyInteger('VarGrid'), $tStart, $tEnd);
|
||||
// Debug-Container initialisieren (sonst "Undefined variable")
|
||||
$dbgProd = null;
|
||||
$dbgFeed = null;
|
||||
$dbgGrid = null;
|
||||
|
||||
$prod = $this->readDelta($this->ReadPropertyInteger('VarProduction'), $tStart, $tEnd, $dbgProd);
|
||||
$feed = $this->readDelta($this->ReadPropertyInteger('VarFeedIn'), $tStart, $tEnd, $dbgFeed);
|
||||
$grid = $this->readDelta($this->ReadPropertyInteger('VarGrid'), $tStart, $tEnd, $dbgGrid);
|
||||
|
||||
// Hausverbrauch = Produktion - Einspeisung + Netz
|
||||
$house = $prod - $feed + $grid;
|
||||
if ($house < 0) {
|
||||
$house = 0.0;
|
||||
}
|
||||
if ($house < 0) $house = 0.0;
|
||||
|
||||
$payload = [
|
||||
'range' => $range,
|
||||
|
||||
Reference in New Issue
Block a user