From c2d71b166e92494808903293df1647253616d7d8 Mon Sep 17 00:00:00 2001 From: "belevo\\mh" Date: Mon, 24 Feb 2025 10:56:11 +0100 Subject: [PATCH] array korregieren --- Batterie/module.php | 6 +++--- library.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Batterie/module.php b/Batterie/module.php index 804f90f..fc01520 100644 --- a/Batterie/module.php +++ b/Batterie/module.php @@ -172,8 +172,8 @@ public function RequestAction($Ident, $Value) } else { - $dummy_array = $array_powersteps[0]; - + $dummy_array[] = $array_powersteps[0]; + $this->SetValue("PowerSteps", json_encode($dummy_array)); } @@ -182,7 +182,7 @@ public function RequestAction($Ident, $Value) if ($batterieladezustand <= $minimumentladen) { - $dummy_array = max($array_powersteps); + $dummy_array[] = max($array_powersteps); $this->SetValue("PowerSteps", json_encode($dummy_array)); } else { $filtered_powersteps = array_filter($array_powersteps, function ($value) use ($maxleistung) { diff --git a/library.json b/library.json index adffc63..4353f14 100644 --- a/library.json +++ b/library.json @@ -6,7 +6,7 @@ "compatibility": { "version": "7.1" }, - "version": "1.056", + "version": "1.057", "build": 0, "date": 0 } \ No newline at end of file