From 5887912085931ed08d4a50124cbbb760336528ff Mon Sep 17 00:00:00 2001 From: "belevo\\mh" Date: Tue, 25 Feb 2025 16:19:38 +0100 Subject: [PATCH] optimiert --- Batterie/module.php | 13 ++++++++++++- library.json | 2 +- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/Batterie/module.php b/Batterie/module.php index 2b23a3f..56e304a 100644 --- a/Batterie/module.php +++ b/Batterie/module.php @@ -104,7 +104,7 @@ public function RequestAction($Ident, $Value) } - + if($this->GetValue("Is_Peak_Shaving")==true){ if ($power >= 0) { $this->SetValue("Ladeleistung", $power); $this->SetValue("Entladeleistung", 0); @@ -115,7 +115,18 @@ public function RequestAction($Ident, $Value) $this->SetValue("Laden3_Entladen4", 4); } + }else{ + if ($power >= 0) { + $this->SetValue("Ladeleistung", $power); + $this->SetValue("Entladeleistung", 0); + $this->SetValue("Laden3_Entladen4", 4); + } else { + $this->SetValue("Entladeleistung", abs($power)); + $this->SetValue("Ladeleistung", 0); + $this->SetValue("Laden3_Entladen4", 3); + } + } // Prüfe auf Änderung der Leistung im Vergleich zur letzten Einstellung $lastPower = GetValue($this->GetIDForIdent("Aktuelle_Leistung")); diff --git a/library.json b/library.json index 8968fce..c99489d 100644 --- a/library.json +++ b/library.json @@ -6,7 +6,7 @@ "compatibility": { "version": "7.1" }, - "version": "1.083", + "version": "1.084", "build": 0, "date": 0 } \ No newline at end of file