From 6e2b1b1facd4179f45a685e08edae2b31afc90a4 Mon Sep 17 00:00:00 2001 From: "belevo\\mh" Date: Mon, 23 Dec 2024 10:35:59 +0100 Subject: [PATCH] div evt behoben --- Batterie/module.php | 12 ++++++++---- library.json | 2 +- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/Batterie/module.php b/Batterie/module.php index ccd9f72..cf17abd 100644 --- a/Batterie/module.php +++ b/Batterie/module.php @@ -12,10 +12,10 @@ class Batterie extends IPSModule $this->RegisterPropertyInteger("AufdasNachladen",0); $this->RegisterPropertyInteger("MinimumEntladen",0); $this->RegisterPropertyInteger("Batterieladezustand",0); - + $this->RegisterPropertyInteger("Ladestrom", 0); + $this->RegisterPropertyInteger("Entladestrom", 0); // Variabeln für Kommunkation mit Manager - $this->RegisterVariableInteger("Ladestrom", "Ladestrom", "", 0); - $this->RegisterVariableInteger("Entladestrom", "Entladestrom", "", 0); + $this->RegisterVariableInteger("Aktuelle_Leistung", "Aktuelle_Leistung", "", 0); $this->RegisterVariableString("PowerSteps", "PowerSteps"); $this->RegisterVariableBoolean("Idle", "Idle", "", 0); @@ -68,14 +68,18 @@ class Batterie extends IPSModule } public function SetAktuelle_Leistung(int $power) - { + { /* // Batterie-spezifische Eigenschaften abrufen $array_powersteps = $this->GeneratePowerSteps(); $aktuellerWert = $this->GetValue("Aktuelle_Leistung"); $minimumentladen = $this->ReadPropertyInteger("MinimumEntladen"); + */ $batterieladezustand = $this->ReadPropertyInteger("Batterieladezustand"); // Als Property gelesen $maxleistung = $this->ReadPropertyInteger("MaxBatterieleistung"); // Als Property gelesen $spannung = $this->ReadPropertyInteger("Batteriespannung"); // Spannung ebenfalls als Property + $ladestrom = $this->ReadPropertyInteger("Ladestrom"); + $entladestrom = $this->ReadPropertyInteger("Entladestrom"); + if ($spannung <= 0) { IPS_LogMessage("Batterie", "Fehler: Batteriespannung ist 0 oder ungültig."); diff --git a/library.json b/library.json index 2aaa960..30cc57e 100644 --- a/library.json +++ b/library.json @@ -6,7 +6,7 @@ "compatibility": { "version": "7.1" }, - "version": "0.219", + "version": "0.220", "build": 0, "date": 0