diff --git a/Ladestation_v2/form.json b/Ladestation_v2/form.json index c7a4c40..498a68e 100644 --- a/Ladestation_v2/form.json +++ b/Ladestation_v2/form.json @@ -39,6 +39,12 @@ "caption": "Intervall Neuberechnung der Werte", "suffix": "Sekunden" }, + { + "type": "NumberSpinner", + "name": "Max_Current", + "caption": "Maximaler Ladestrom", + "suffix": "Sekunden" + }, { "type": "ValidationTextBox", "name": "IP_Adresse", diff --git a/Ladestation_v2/module.php b/Ladestation_v2/module.php index 0055f51..c0b8e5d 100644 --- a/Ladestation_v2/module.php +++ b/Ladestation_v2/module.php @@ -15,7 +15,7 @@ class Ladestation_v2 extends IPSModule $this->RegisterPropertyString("Username", ""); $this->RegisterPropertyString("Password", ""); $this->RegisterPropertyInteger("Interval", 5); // Recheninterval - + $this->RegisterPropertyInteger("Max_Current", 32); // Recheninterval // Ladestationspezifische Variabeln $this->RegisterVariableFloat("Max_Current","Maximaler Ladestrom","", 0); @@ -307,8 +307,8 @@ class Ladestation_v2 extends IPSModule else{ $maxCurrent = 1.5 + ($this->GetValue("Ladeleistung_Effektiv") / (1.71*400)); } - if($maxCurrent>32){ - $maxCurrent = 32; + if($maxCurrent>$this->ReadPropertyInteger("Max_Current")){ + $maxCurrent = $this->ReadPropertyInteger("Max_Current"); } $this->SetValue("Max_Current", $maxCurrent); }