From ca9e8c76aed32b21401a88b9f969bc716859a81c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20H=C3=A4fliger?= Date: Fri, 7 Mar 2025 14:37:12 +0100 Subject: [PATCH] =?UTF-8?q?kleinere=20anpassungen=20an=20batt,=20manager,?= =?UTF-8?q?=20Fehelrbehebung=20auf=20manager=20haupt=20=C3=BCbernommen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Batterie/form.json | 4 ++-- Batterie/module.php | 4 ++-- HauptManager/module.php | 9 +++++++-- library.json | 2 +- 4 files changed, 12 insertions(+), 7 deletions(-) diff --git a/Batterie/form.json b/Batterie/form.json index c27d522..091c79c 100644 --- a/Batterie/form.json +++ b/Batterie/form.json @@ -41,11 +41,11 @@ "caption":"Batteriemanagement", "options":[ { - "caption":"Vom Wechelrichterhersteller", + "caption":"Durch Wechselrichter", "value":1 }, { - "caption":"Von der Firma Belevo", + "caption":"Durch EMS Symcon", "value":4 } ] diff --git a/Batterie/module.php b/Batterie/module.php index 2589125..c9b272b 100644 --- a/Batterie/module.php +++ b/Batterie/module.php @@ -188,7 +188,7 @@ public function RequestAction($Ident, $Value) $dummy_array[] = $netzbezug; $this->SetValue("PowerSteps", json_encode($dummy_array)); - }else if($batterieladezustand>$minimumentladen){ + }elseif($batterieladezustand>$minimumentladen){ $this->SetValue("PowerSteps", json_encode($array_powersteps)); } @@ -211,7 +211,7 @@ public function RequestAction($Ident, $Value) }); $this->SetValue("PowerSteps", json_encode($filtered_powersteps_entladen)); - }else if($batterieladezustand>=$aufdasnachladen && $hyst==false){ + }elseif($batterieladezustand>=$aufdasnachladen && $hyst==false){ $this->SetValue("PowerSteps", json_encode($array_powersteps)); diff --git a/HauptManager/module.php b/HauptManager/module.php index 027a91e..de64bcc 100644 --- a/HauptManager/module.php +++ b/HauptManager/module.php @@ -290,8 +290,13 @@ class HauptManager extends IPSModule ); // Jedem user den höheren der beiden werte aus minimalwert oder vergebenem zuteilen - $leistung = max($leistung, $minimalleitsung); - + if($leistung <= $remainingPower){ + $leistung = max($leistung, $minimalleitsung); + }else{ + $leistung = min($leistung, $minimalleitsung); + + } + // Methode SetAktuelle_Leistung für jeden Verbraucher mit der entsprechenden Energie aufrufen $resultArray[] = $userEnergyProv[$userInstanceID]; //[ diff --git a/library.json b/library.json index 96fc525..40cbfdd 100644 --- a/library.json +++ b/library.json @@ -6,7 +6,7 @@ "compatibility": { "version": "7.1" }, - "version": "1.246", + "version": "1.248", "build": 0, "date": 0 } \ No newline at end of file