no message

This commit is contained in:
mh
2025-12-17 08:36:43 +01:00
parent 26fd4a4159
commit 38f450b00e
+9 -8
View File
@@ -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,