From 8435a0c0892352f1394b79b68be5e78d1026dc57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20H=C3=A4fliger?= Date: Mon, 11 Nov 2024 10:43:18 +0100 Subject: [PATCH] Currentpower angepasst --- WP_Steuerung/module.php | 20 ++++++++++++++++---- library.json | 2 +- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/WP_Steuerung/module.php b/WP_Steuerung/module.php index 4159739..e335f23 100644 --- a/WP_Steuerung/module.php +++ b/WP_Steuerung/module.php @@ -105,21 +105,33 @@ class WP_Steuerung extends IPSModule { { 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("Zustand_WP", 2); + $this->SetValue("CurrentPower", $this->ReadPropertyInteger("WP_Leistung")) + } } elseif($LastPeak && $power == 0){ - $this->SetValue("Zustand_WP", 2); + $this->SetValue("Zustand_WP", 2); + $this->SetValue("CurrentPower", 0) + } elseif($LastPeak == false && $power == ($this->ReadPropertyInteger("WP_Leistung"))){ - $this->SetValue("Zustand_WP", 3); + $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("Zustand_WP", 2); + $this->SetValue("CurrentPower", 0) + } } diff --git a/library.json b/library.json index 00ee253..663dbfb 100644 --- a/library.json +++ b/library.json @@ -6,7 +6,7 @@ "compatibility": { "version": "7.1" }, - "version": "0.113", + "version": "0.114", "build": 0, "date": 0 } \ No newline at end of file