diff --git a/Batterie_Deye/form.json b/Batterie_Deye/form.json index 86404ed..438b941 100644 --- a/Batterie_Deye/form.json +++ b/Batterie_Deye/form.json @@ -68,8 +68,8 @@ }, { "type": "SelectVariable", - "name": "Batterieladezustand", - "caption": "Batterieladezustand", + "name": "Batteriespannung", + "caption": "Batteriespannung", "test": true }, { diff --git a/Batterie_Deye/module.php b/Batterie_Deye/module.php index 4a1a7a4..785d166 100644 --- a/Batterie_Deye/module.php +++ b/Batterie_Deye/module.php @@ -13,7 +13,6 @@ class Batterie_Deye extends IPSModule $this->RegisterPropertyInteger("Batteriespannung", 50); $this->RegisterPropertyFloat("AufdasNachladen",0); $this->RegisterPropertyFloat("MinimumEntladen",0); - $this->RegisterPropertyInteger("Batterieladezustand",0); $this->RegisterPropertyInteger("Batteriemanagement", 1); $this->RegisterPropertyInteger("Kotnrolle_TOU_Spannung", 0); $this->RegisterPropertyInteger("Kotnrolle_Selling_CT", 0); @@ -232,10 +231,12 @@ public function RequestAction($Ident, $Value) //$a = 2.54 * pow($V, 2) - 252 * $V + 6255.4; + $ladestrom_1 = GetValue("Ladestrom"); + $entadestrom_1 = GetValue("Entladedestrom"); - if (GetValue("Ladestrom") > 0 ) { + if ($ladestrom_1 > 0 ) { $V = GetValue($this->ReadPropertyInteger("Batteriespannung")) + 1; - }elseif (GetValue("Entladedestrom") > 0) { + }elseif ($entadestrom_1 > 0) { $V = GetValue($this->ReadPropertyInteger("Batteriespannung")) - 1; } else {