diff --git a/Bat_EV_SDL _V2/module.php b/Bat_EV_SDL _V2/module.php index 1035356..47cb416 100644 --- a/Bat_EV_SDL _V2/module.php +++ b/Bat_EV_SDL _V2/module.php @@ -614,12 +614,19 @@ private function CalculateBatteryDistribution(float $pEvW, float $pSdlW): array ]; } + + $batteriesRaw = json_decode($this->ReadPropertyString("Batteries")); + $totalPower_ist = 0; - print_r($batteries); - foreach ($batteries as $bat) { - $totalPower_ist += 0; // GetValue($bat['register_bat_power']); + print_r($batteriesRaw); + foreach ($batteriesRaw as $bat) { + $totalPower_ist += GetValue($bat['register_bat_power']); } + + + + if(($pEvW + $pSdlW) === 0){