diff --git a/Batterie/module.php b/Batterie/module.php index 0c0b0c4..83dee34 100644 --- a/Batterie/module.php +++ b/Batterie/module.php @@ -9,13 +9,11 @@ class Batterie extends IPSModule // Batterie spezifische Eigenschaften $this->RegisterPropertyInteger("MaxBatterieleistung", 0); $this->RegisterPropertyInteger("Batteriespannung", 50); - - // Batterie spezifische Variablen - $this->RegisterVariableInteger("AufdasNachladen","AufdasNachladen","",0); - $this->RegisterVariableInteger("MinimumEntladen","MinimumEntladen","",0); - $this->RegisterVariableInteger("Entladestrom","Entladestrom","",0); - $this->RegisterVariableInteger("Ladestrom","Ladestrom","",0); - $this->RegisterVariableInteger("Batterieladezustand","Batterieladezustand","",0); + $this->RegisterPropertyInteger("AufdasNachladen","AufdasNachladen","",0); + $this->RegisterPropertyInteger("MinimumEntladen","MinimumEntladen","",0); + $this->RegisterPropertyInteger("Entladestrom","Entladestrom","",0); + $this->RegisterPropertyInteger("Ladestrom","Ladestrom","",0); + $this->RegisterPropertyInteger("Batterieladezustand","Batterieladezustand","",0); // Variabeln für Kommunkation mit Manager $this->RegisterVariableInteger("Aktuelle_Leistung", "Aktuelle_Leistung", "", 0); @@ -65,8 +63,8 @@ class Batterie extends IPSModule { // Batterie-spezifische Eigenschaften abrufen $spannung = $this->ReadPropertyInteger("Batteriespannung"); - $entladestrom = GetValue($this->GetIDForIdent("Entladestrom")); - $ladestrom = GetValue($this->GetIDForIdent("Ladestrom")); + $entladestrom = $this->ReadPropertyInteger("Entladestrom")); + $ladestrom = $this->ReadPropertyInteger("Ladestrom")); $maxleistung = $this->ReadPropertyInteger("MaxBatterieleistung"); // Batterie entladen oder laden basierend auf der Leistung @@ -99,9 +97,9 @@ class Batterie extends IPSModule public function GetCurrentData(bool $Peak) { // Werte der registrierten Variablen abrufen und in Variablen speichern - $aufdasnachladen = GetValue($this->GetIDForIdent("AufdasNachladen")); - $minimumentladen = GetValue($this->GetIDForIdent("MinimumEntladen")); - $batterieladezustand = GetValue($this->GetIDForIdent("Batterieladezustand")); + $aufdasnachladen =$this->ReadPropertyInteger("AufdasNachladen")); + $minimumentladen = $this->ReadPropertyInteger("MinimumEntladen")); + $batterieladezustand = $this->ReadPropertyInteger("Batterieladezustand")); $maxleistung = $this->ReadPropertyInteger("MaxBatterieleistung"); if ($Peak) { diff --git a/library.json b/library.json index 6f48c29..f8745cc 100644 --- a/library.json +++ b/library.json @@ -6,7 +6,7 @@ "compatibility": { "version": "7.1" }, - "version": "0.184", + "version": "0.185", "build": 0, "date": 0 } \ No newline at end of file