no message
This commit is contained in:
@@ -97,16 +97,18 @@ class Ladestation_v2 extends IPSModule
|
||||
|
||||
public function Detect_Car(int $carType)
|
||||
{
|
||||
$is_full = false;
|
||||
|
||||
if($this->GetValue("Car_Detected")){
|
||||
if($this->Get_Car_Status($carType)==true){
|
||||
$this->SetValue("Car_Detected", true);
|
||||
if($this->GetValue("Max_Current")<6){
|
||||
$is_full = true;
|
||||
$this-SetValue("Car_is_full", true);
|
||||
}
|
||||
|
||||
}else{
|
||||
$this->SetValue("Car_Detected", false);
|
||||
$this-SetValue("Car_is_full", false);
|
||||
|
||||
}
|
||||
}
|
||||
else{
|
||||
@@ -146,7 +148,6 @@ class Ladestation_v2 extends IPSModule
|
||||
}
|
||||
}
|
||||
|
||||
$this-SetValue("Car_is_full", $is_full);
|
||||
return $this->GetValue("Car_Detected");
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user