From 708a48808666cec4b21868482b49d036bc9ea5ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20H=C3=A4fliger?= Date: Mon, 11 Nov 2024 11:03:18 +0100 Subject: [PATCH] semikolon vergessen --- WP_Steuerung/module.php | 111 +++++++++++++++++++++++++--------------- library.json | 2 +- 2 files changed, 72 insertions(+), 41 deletions(-) diff --git a/WP_Steuerung/module.php b/WP_Steuerung/module.php index e335f23..a1727fb 100644 --- a/WP_Steuerung/module.php +++ b/WP_Steuerung/module.php @@ -105,32 +105,32 @@ class WP_Steuerung extends IPSModule { { if($LastPeak && $power == ($this->ReadPropertyInteger("WP_Leistung"))) { $this->SetValue("Zustand_WP", 1); - $this->SetValue("CurrentPower", $this->ReadPropertyInteger("WP_Leistung")) + $this->SetValue("CurrentPower", $this->ReadPropertyInteger("WP_Leistung")); if($its_lock_time){ $this->SetValue("Zustand_WP", 2); - $this->SetValue("CurrentPower", $this->ReadPropertyInteger("WP_Leistung")) + $this->SetValue("CurrentPower", $this->ReadPropertyInteger("WP_Leistung")); } } elseif($LastPeak && $power == 0){ $this->SetValue("Zustand_WP", 2); - $this->SetValue("CurrentPower", 0) + $this->SetValue("CurrentPower", 0); } elseif($LastPeak == false && $power == ($this->ReadPropertyInteger("WP_Leistung"))){ $this->SetValue("Zustand_WP", 3); - $this->SetValue("CurrentPower", $this->ReadPropertyInteger("WP_Leistung")) + $this->SetValue("CurrentPower", $this->ReadPropertyInteger("WP_Leistung")); } elseif($LastPeak == false && $power == 0){ $this->SetValue("Zustand_WP", 1); - $this->SetValue("CurrentPower", 0) + $this->SetValue("CurrentPower", 0); if($its_lock_time){ $this->SetValue("Zustand_WP", 2); - $this->SetValue("CurrentPower", 0) + $this->SetValue("CurrentPower", 0); } @@ -138,43 +138,74 @@ class WP_Steuerung extends IPSModule { }elseif($state == 2) // Sperre { - if($LastPeak && $power == ($this->ReadPropertyInteger("WP_Leistung"))) { - $this->SetValue("Zustand_WP", 1); - if($its_lock_time){ - $this->SetValue("Zustand_WP", 2); - } - } elseif($LastPeak && $power == 0){ - $this->SetValue("Zustand_WP", 2); - - } - elseif($LastPeak == false && $power == ($this->ReadPropertyInteger("WP_Leistung"))){ - $this->SetValue("Zustand_WP", 3); - - } - elseif($LastPeak == false && $power == 0){ - $this->SetValue("Zustand_WP", 1); - if($its_lock_time){ - $this->SetValue("Zustand_WP", 2); - } - - } + if($LastPeak && $power == ($this->ReadPropertyInteger("WP_Leistung"))) { + $this->SetValue("Zustand_WP", 1); + $this->SetValue("CurrentPower", $this->ReadPropertyInteger("WP_Leistung")); + + if($its_lock_time){ + $this->SetValue("Zustand_WP", 2); + $this->SetValue("CurrentPower", $this->ReadPropertyInteger("WP_Leistung")); + + } + } elseif($LastPeak && $power == 0){ + $this->SetValue("Zustand_WP", 2); + $this->SetValue("CurrentPower", 0); + + + } + elseif($LastPeak == false && $power == ($this->ReadPropertyInteger("WP_Leistung"))){ + $this->SetValue("Zustand_WP", 3); + $this->SetValue("CurrentPower", $this->ReadPropertyInteger("WP_Leistung")); + + + } + elseif($LastPeak == false && $power == 0){ + $this->SetValue("Zustand_WP", 1); + $this->SetValue("CurrentPower", 0); + + if($its_lock_time){ + $this->SetValue("Zustand_WP", 2); + $this->SetValue("CurrentPower", 0); + + } + + } }elseif($state == 3) // Erhöht { - if($LastPeak && $power == ($this->ReadPropertyInteger("WP_Leistung"))) { - $this->SetValue("Zustand_WP", 1); - } elseif($LastPeak && $power == 0){ - $this->SetValue("Zustand_WP", 2); - - } - elseif($LastPeak == false && $power == ($this->ReadPropertyInteger("WP_Leistung"))){ - $this->SetValue("Zustand_WP", 3); - - } - elseif($LastPeak == false && $power == 0){ - $this->SetValue("Zustand_WP", 1); - - } + + if($LastPeak && $power == ($this->ReadPropertyInteger("WP_Leistung"))) { + $this->SetValue("Zustand_WP", 1); + $this->SetValue("CurrentPower", $this->ReadPropertyInteger("WP_Leistung")); + + if($its_lock_time){ + $this->SetValue("Zustand_WP", 2); + $this->SetValue("CurrentPower", $this->ReadPropertyInteger("WP_Leistung")); + + } + } elseif($LastPeak && $power == 0){ + $this->SetValue("Zustand_WP", 2); + $this->SetValue("CurrentPower", 0); + + + } + elseif($LastPeak == false && $power == ($this->ReadPropertyInteger("WP_Leistung"))){ + $this->SetValue("Zustand_WP", 3); + $this->SetValue("CurrentPower", $this->ReadPropertyInteger("WP_Leistung")); + + + } + elseif($LastPeak == false && $power == 0){ + $this->SetValue("Zustand_WP", 1); + $this->SetValue("CurrentPower", 0); + + if($its_lock_time){ + $this->SetValue("Zustand_WP", 2); + $this->SetValue("CurrentPower", 0); + + } + + } } else{ diff --git a/library.json b/library.json index 663dbfb..f432710 100644 --- a/library.json +++ b/library.json @@ -6,7 +6,7 @@ "compatibility": { "version": "7.1" }, - "version": "0.114", + "version": "0.115", "build": 0, "date": 0 } \ No newline at end of file