From 7f03cc84d5160f9ecc8769e9c70128dd97981387 Mon Sep 17 00:00:00 2001 From: "belevo\\mh" Date: Tue, 24 Dec 2024 08:08:39 +0100 Subject: [PATCH] batteriezustand --- Batterie/module.php | 5 ++++- library.json | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Batterie/module.php b/Batterie/module.php index 811a49a..e431d3a 100644 --- a/Batterie/module.php +++ b/Batterie/module.php @@ -90,10 +90,12 @@ class Batterie extends IPSModule if ($power > $maxleistung) { $ladestrom = ($power - $maxleistung) / $spannung; $this->SetValue("Ladestrom", $ladestrom); + $this->SetValue("Entladestrom", 0); IPS_LogMessage("Batterie", "Ladestrom: " . $ladestrom); } else { $entladestrom = $power / $spannung; $this->SetValue("Entladestrom", $entladestrom); + $this->SetValue("Ladestrom", 0); IPS_LogMessage("Batterie", "Entladestrom: " . $entladestrom); } @@ -122,7 +124,8 @@ class Batterie extends IPSModule $array_powersteps = $this->GeneratePowerSteps(); $aufdasnachladen = $this->ReadPropertyInteger("AufdasNachladen"); $minimumentladen = $this->ReadPropertyInteger("MinimumEntladen"); - $batterieladezustand = $this->ReadPropertyInteger("Batterieladezustand"); // Als Property gelesen + $batteriezustand = GetValue($this->GetIDForIdent("Batteriezustand")); + //$batterieladezustand = $this->ReadPropertyInteger("Batterieladezustand"); // Als Property gelesen $maxleistung = $this->ReadPropertyInteger("MaxBatterieleistung"); // Als Property gelesen IPS_LogMessage("Batterie", "Batterieladezustand: ".$batterieladezustand); IPS_LogMessage("Batterie", "AufdasNachladen: ".$aufdasnachladen); diff --git a/library.json b/library.json index 2eca1f9..62fbee4 100644 --- a/library.json +++ b/library.json @@ -6,7 +6,7 @@ "compatibility": { "version": "7.1" }, - "version": "0.228", + "version": "0.229", "build": 0, "date": 0