diff --git a/Ladestation_v2/module.php b/Ladestation_v2/module.php index 723fc35..8ba1eb8 100644 --- a/Ladestation_v2/module.php +++ b/Ladestation_v2/module.php @@ -553,7 +553,15 @@ class Ladestation_v2 extends IPSModule if ($power === 0) { // power == 0: nur eine 0 zurückgeben $resultArray[] = 0; - return $resultArray; + }else{ + if ($is_1_ph) { + $resultArray[] = $this->GetValue("Mindestaldestrom") * 230; + } else { + $resultArray[] = $this->GetValue("Mindestaldestrom") * 400 * 1.71; + } + return $resultArray; + + } } // power > 0: keine 0 am Anfang, Schleife normal durchlaufen } else { @@ -568,7 +576,7 @@ class Ladestation_v2 extends IPSModule // Schleife wie gehabt - for ($i = 6; $i <= $current; $i++) { + for ($i = (max($this->GetValue("Mindestaldestrom") + 1, 6)); $i <= $current; $i++) { if ($is_1_ph) { $resultArray[] = $i * 230; } else { @@ -682,7 +690,12 @@ class Ladestation_v2 extends IPSModule } elseif (!$Peak && $solarladen) { $powerSteps = $this->Get_Array_From_Current($this->GetValue("Is_1_ph"),$this->GetValue("Max_Current"), $this->GetValue("Aktuelle_Leistung"), $this->GetValue("IsTimerActive_Null_Timer")); } elseif ($solarladen && $Peak) { - $powerSteps = [0]; + if ($is_1_ph) { + $powerSteps = [$this->GetValue("Mindestaldestrom") * 230]; + } else { + $powerSteps = [$this->GetValue("Mindestaldestrom") * 400 * 1.71]; + } + } } else { $powerSteps = $this->Get_Array_From_Current($this->GetValue("Is_1_ph"),$this->GetValue("Max_Current"), $this->GetValue("Aktuelle_Leistung"), $this->GetValue("IsTimerActive_Null_Timer")); }