diff --git a/Batterie/module.php b/Batterie/module.php index 797eb9b..2589125 100644 --- a/Batterie/module.php +++ b/Batterie/module.php @@ -154,6 +154,13 @@ public function RequestAction($Ident, $Value) public function GetCurrentData(bool $Peak) { + $array_powersteps = $this->GeneratePowerSteps(); + $aufdasnachladen = $this->ReadPropertyInteger("AufdasNachladen"); + $minimumentladen = $this->ReadPropertyInteger("MinimumEntladen"); + $maxleistung = $this->ReadPropertyInteger("MaxBatterieleistung"); + $dummy_array = []; + $batterieladezustand = $this->ReadPropertyInteger("Batterieladezustand"); + if ($this->ReadPropertyInteger("Batteriemanagement") == 1) { $dummy_array[] = 0; return $this->SetValue("PowerSteps", json_encode($dummy_array)); @@ -164,13 +171,6 @@ public function RequestAction($Ident, $Value) $netzbezug = $maxleistung * (-1); } - $array_powersteps = $this->GeneratePowerSteps(); - $aufdasnachladen = $this->ReadPropertyInteger("AufdasNachladen"); - $minimumentladen = $this->ReadPropertyInteger("MinimumEntladen"); - $maxleistung = $this->ReadPropertyInteger("MaxBatterieleistung"); - $dummy_array = []; - $batterieladezustand = $this->ReadPropertyInteger("Batterieladezustand"); - if($batterieladezustand>(5+$aufdasnachladen)){ $this->SetValue("Hysterese", false); diff --git a/library.json b/library.json index d07f958..97e04d8 100644 --- a/library.json +++ b/library.json @@ -6,7 +6,7 @@ "compatibility": { "version": "7.1" }, - "version": "1.236", + "version": "1.237", "build": 0, "date": 0 } \ No newline at end of file