erweitert

This commit is contained in:
mh
2025-02-25 09:18:44 +01:00
parent 060c2da3bb
commit 4daa5628d7
2 changed files with 12 additions and 2 deletions
+11 -1
View File
@@ -134,13 +134,23 @@ public function RequestAction($Ident, $Value)
public function GetCurrentData(bool $Peak) public function GetCurrentData(bool $Peak)
{ {
IPS_LogMessage("Batterie", "peak: " . ($Peak ? "true" : "false"));
$array_powersteps = $this->GeneratePowerSteps(); $array_powersteps = $this->GeneratePowerSteps();
$aufdasnachladen = $this->ReadPropertyInteger("AufdasNachladen"); $aufdasnachladen = $this->ReadPropertyInteger("AufdasNachladen");
$minimumentladen = $this->ReadPropertyInteger("MinimumEntladen"); $minimumentladen = $this->ReadPropertyInteger("MinimumEntladen");
$maxleistung = $this->ReadPropertyInteger("MaxBatterieleistung"); $maxleistung = $this->ReadPropertyInteger("MaxBatterieleistung");
$dummy_array = []; $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"); $batterieladezustandID = $this->ReadPropertyInteger("Batterieladezustand");
if ($batterieladezustandID > 0) { if ($batterieladezustandID > 0) {
$batterieladezustand = GetValue($batterieladezustandID); $batterieladezustand = GetValue($batterieladezustandID);
+1 -1
View File
@@ -6,7 +6,7 @@
"compatibility": { "compatibility": {
"version": "7.1" "version": "7.1"
}, },
"version": "1.073", "version": "1.074",
"build": 0, "build": 0,
"date": 0 "date": 0
} }