diff --git a/Batterie/module.php b/Batterie/module.php index 7c5cdd2..398be66 100644 --- a/Batterie/module.php +++ b/Batterie/module.php @@ -134,13 +134,23 @@ public function RequestAction($Ident, $Value) public function GetCurrentData(bool $Peak) { - IPS_LogMessage("Batterie", "peak: " . ($Peak ? "true" : "false")); + $array_powersteps = $this->GeneratePowerSteps(); $aufdasnachladen = $this->ReadPropertyInteger("AufdasNachladen"); $minimumentladen = $this->ReadPropertyInteger("MinimumEntladen"); $maxleistung = $this->ReadPropertyInteger("MaxBatterieleistung"); $dummy_array = []; + + + + $batterieManagement = $this->ReadPropertyInteger("Batteriemanagement"); + if ($batterieManagement == 1) { + $dummy_array[] = $array_powersteps[0]; + return $this->SetValue("PowerSteps", json_encode($dummy_array)); + } + + $batterieladezustandID = $this->ReadPropertyInteger("Batterieladezustand"); if ($batterieladezustandID > 0) { $batterieladezustand = GetValue($batterieladezustandID); diff --git a/library.json b/library.json index 6d8cef9..e6b65d0 100644 --- a/library.json +++ b/library.json @@ -6,7 +6,7 @@ "compatibility": { "version": "7.1" }, - "version": "1.073", + "version": "1.074", "build": 0, "date": 0 } \ No newline at end of file