Maximaler ladestrom wird mitgerechnet

This commit is contained in:
dh
2025-04-23 10:39:28 +02:00
parent fe9f03fa16
commit a426327ef3
2 changed files with 9 additions and 3 deletions
+6
View File
@@ -39,6 +39,12 @@
"caption": "Intervall Neuberechnung der Werte", "caption": "Intervall Neuberechnung der Werte",
"suffix": "Sekunden" "suffix": "Sekunden"
}, },
{
"type": "NumberSpinner",
"name": "Max_Current",
"caption": "Maximaler Ladestrom",
"suffix": "Sekunden"
},
{ {
"type": "ValidationTextBox", "type": "ValidationTextBox",
"name": "IP_Adresse", "name": "IP_Adresse",
+3 -3
View File
@@ -15,7 +15,7 @@ class Ladestation_v2 extends IPSModule
$this->RegisterPropertyString("Username", ""); $this->RegisterPropertyString("Username", "");
$this->RegisterPropertyString("Password", ""); $this->RegisterPropertyString("Password", "");
$this->RegisterPropertyInteger("Interval", 5); // Recheninterval $this->RegisterPropertyInteger("Interval", 5); // Recheninterval
$this->RegisterPropertyInteger("Max_Current", 32); // Recheninterval
// Ladestationspezifische Variabeln // Ladestationspezifische Variabeln
$this->RegisterVariableFloat("Max_Current","Maximaler Ladestrom","", 0); $this->RegisterVariableFloat("Max_Current","Maximaler Ladestrom","", 0);
@@ -307,8 +307,8 @@ class Ladestation_v2 extends IPSModule
else{ else{
$maxCurrent = 1.5 + ($this->GetValue("Ladeleistung_Effektiv") / (1.71*400)); $maxCurrent = 1.5 + ($this->GetValue("Ladeleistung_Effektiv") / (1.71*400));
} }
if($maxCurrent>32){ if($maxCurrent>$this->ReadPropertyInteger("Max_Current")){
$maxCurrent = 32; $maxCurrent = $this->ReadPropertyInteger("Max_Current");
} }
$this->SetValue("Max_Current", $maxCurrent); $this->SetValue("Max_Current", $maxCurrent);
} }