diff --git a/Bat_EV_SDL _V2/module.php b/Bat_EV_SDL _V2/module.php index 75db65a..0106be8 100644 --- a/Bat_EV_SDL _V2/module.php +++ b/Bat_EV_SDL _V2/module.php @@ -627,7 +627,7 @@ private function CalculateBatteryDistribution(float $pEvW, float $pSdlW): array $totalPower_ist = 0; foreach ($batteriesRaw as $bat) { - $totalPower_ist += (-1)*GetValue($bat->register_bat_power); + $totalPower_ist += GetValue($bat->register_bat_power); } // ---------------------------- @@ -664,7 +664,7 @@ private function CalculateBatteryDistribution(float $pEvW, float $pSdlW): array // aktuelle - SDL_SOLL = aktuelle EV // ---------------------------- $this->SetValue("Aktuelle_Leistung_SDL", $pSdlW); - $this->SetValue("Aktuelle_Leistung_EV", $totalPower_ist - $pSdlW); + $this->SetValue("Aktuelle_Leistung_EV", $totalPower_ist + $pSdlW); return $finalOutput; }