diff --git a/Bat_EV_SDL _V2/module.php b/Bat_EV_SDL _V2/module.php index 47cb416..2685c01 100644 --- a/Bat_EV_SDL _V2/module.php +++ b/Bat_EV_SDL _V2/module.php @@ -619,15 +619,18 @@ private function CalculateBatteryDistribution(float $pEvW, float $pSdlW): array $totalPower_ist = 0; print_r($batteriesRaw); + print_r("\N"); + foreach ($batteriesRaw as $bat) { + print_r($bat); + print_r("\N"); + print_r($GetValue($bat['register_bat_power'])); + print_r("\N"); + $totalPower_ist += GetValue($bat['register_bat_power']); } - - - - if(($pEvW + $pSdlW) === 0){ $this->SetValue("Aktuelle_Leistung_EV", $totalPower_ist/2);