semikolon falsch gesetzt

This commit is contained in:
dh
2024-12-17 16:10:29 +01:00
parent 7d5c3e358a
commit 91e383a36a
2 changed files with 7 additions and 6 deletions
+6 -5
View File
@@ -251,7 +251,7 @@ class Ladestation_Universal extends IPSModule
$baseUrl ="http://" . $this->ReadPropertyString("IP_Adresse") . "/api/set?"; $baseUrl ="http://" . $this->ReadPropertyString("IP_Adresse") . "/api/set?";
}elseif(ReadPropertyInteger("Ladestation")==1){ }elseif(ReadPropertyInteger("Ladestation")==1){
$baseUrl ="http://" . $this->ReadPropertyString("IP_Adresse") . "/mqtt?payload="; $baseUrl ="http://" . $this->ReadPropertyString("IP_Adresse") . "/mqtt?payload=";
} }
// Base URL // Base URL
IPS_LogMessage("Ladestation", "Aufgerufene ip" . $baseUrl); IPS_LogMessage("Ladestation", "Aufgerufene ip" . $baseUrl);
@@ -269,18 +269,17 @@ class Ladestation_Universal extends IPSModule
}elseif(ReadPropertyInteger("Ladestation")==1){ }elseif(ReadPropertyInteger("Ladestation")==1){
$url = $baseUrl . "alw=0"; $url = $baseUrl . "alw=0";
} }
curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch); $response = curl_exec($ch);
curl_close($ch); curl_close($ch);
return $response; return $response;
} }
// For value between 1 and 32, make two requests // For value between 1 and 32, make two requests
elseif ($value >= 1 && $value <= 32) { elseif ($value >= 1 && $value <= 32) {
// First request // First request
if ($value == 0) {
if(ReadPropertyInteger("Ladestation")==2){ if(ReadPropertyInteger("Ladestation")==2){
$url = $baseUrl . "frc=2"; $url = $baseUrl . "frc=2";
}elseif(ReadPropertyInteger("Ladestation")==1){ }elseif(ReadPropertyInteger("Ladestation")==1){
@@ -299,7 +298,7 @@ class Ladestation_Universal extends IPSModule
// Second request // Second request
if ($value == 0) {
if(ReadPropertyInteger("Ladestation")==2){ if(ReadPropertyInteger("Ladestation")==2){
$url2 = $baseUrl . "amp=$value"; $url2 = $baseUrl . "amp=$value";
}elseif(ReadPropertyInteger("Ladestation")==1){ }elseif(ReadPropertyInteger("Ladestation")==1){
@@ -326,6 +325,7 @@ class Ladestation_Universal extends IPSModule
else { else {
return "Invalid value. Must be between 0 and 32."; return "Invalid value. Must be between 0 and 32.";
} }
} }
public function convertPowerToCurrent($value, $Lademodus) public function convertPowerToCurrent($value, $Lademodus)
@@ -525,5 +525,6 @@ class Ladestation_Universal extends IPSModule
return $result; return $result;
} }
} }
?> ?>
+1 -1
View File
@@ -6,7 +6,7 @@
"compatibility": { "compatibility": {
"version": "7.1" "version": "7.1"
}, },
"version": "0.191", "version": "0.192",
"build": 0, "build": 0,
"date": 0 "date": 0
} }