diff --git a/Ladestation_v2/module.php b/Ladestation_v2/module.php index 1ce0b30..74d7b02 100644 --- a/Ladestation_v2/module.php +++ b/Ladestation_v2/module.php @@ -236,6 +236,15 @@ class Ladestation_v2 extends IPSModule } $this->SetValue("Car_detected", true); + + if ($this->GetValue("Is_1_ph")) { + $power = $this->GetValue("Mindestaldestrom") * 230; + } + else { + $power = $this->GetValue("Mindestaldestrom") * 400 * 1.71; + } + + $this->SetValue("Power", $power) } @@ -522,9 +531,11 @@ class Ladestation_v2 extends IPSModule { $maxCurrent = 32; if($is_1_ph){ + $maxCurrent = 2.5 + ($this->GetValue("Ladeleistung_Effektiv") / 230); } else{ + $maxCurrent = 2.5 + ($this->GetValue("Ladeleistung_Effektiv") / (1.71*400)); } if($maxCurrent>$this->ReadPropertyInteger("Max_Current_abs")){ @@ -721,7 +732,10 @@ class Ladestation_v2 extends IPSModule if($counter>(90/($this->ReadPropertyInteger("Interval")))){ $this->SetValue("Pending_Counter", 0); + if(max(json_decode($this->GetValue("PowerSteps")))==$this->GetVaue($power)){ $this->Calc_Max_Current($this->GetValue("Is_1_ph")); + + } } return $powerSteps;