diff --git a/Batterie_2/module.php b/Batterie_2/module.php index ad7385e..0ff8ac7 100644 --- a/Batterie_2/module.php +++ b/Batterie_2/module.php @@ -24,8 +24,6 @@ class Batterie_2 extends IPSModule $this->RegisterVariableInteger("Batteriemanagement_Variabel","Batteriemanagement_Variabel", "",0); $this->RegisterVariableInteger("Laden3_Entladen4","Laden3_Entladen4", "",3); $this->RegisterVariableInteger("Laden_Entladen","Laden_Entladen", "",3); - $this->RegisterVariableInteger("Laden","Laden", "",0); - $this->RegisterVariableInteger("Entladen","Entladen", "",0); $this->RegisterVariableFloat("Ladeleistung","Ladeleistung", "",0); $this->RegisterVariableFloat("Goodwe_EntLadeleistung","Goodwe_EntLadeleistung", "",0); $this->RegisterVariableInteger("Aktuelle_Leistung", "Aktuelle_Leistung", "", 0); @@ -178,8 +176,8 @@ public function RequestAction($Ident, $Value) - - if (GetValue($this->ReadPropertyInteger("Batterietyp")) == 1) {//Goodwe + $batterietyp = GetValue($this->ReadPropertyInteger("Batterietyp")); + if ($batterietyp == 1) {//Goodwe //-----------------------Gooodwee-------------------------------------// if($this->GetValue("Is_Peak_Shaving")==true){ @@ -205,10 +203,10 @@ public function RequestAction($Ident, $Value) } }elseif (GetValue($this->ReadPropertyInteger("Batterietyp")) == 2) {//Solaredge - # code... //-----------------------Solaredge-------------------------------------// if($this->GetValue("Is_Peak_Shaving")==true){ + if ($power >= 0) { $this->SetValue("Ladeleistung", $power); $this->SetValue("Entladeleistung", 0);