From 336d6fed820d78543e3e36c3c485bbadf3686ef6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20H=C3=A4fliger?= Date: Tue, 8 Apr 2025 08:36:01 +0200 Subject: [PATCH] no message --- Ladestation_v2/module.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Ladestation_v2/module.php b/Ladestation_v2/module.php index cddb41c..913963c 100644 --- a/Ladestation_v2/module.php +++ b/Ladestation_v2/module.php @@ -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"); }