This commit is contained in:
@@ -588,7 +588,7 @@ class LadestationStandAlone extends IPSModule implements VerbraucherSchnittstell
|
||||
$this->setzeFahrzeugstromKandidatZurueck();
|
||||
|
||||
$transport = new LadestationTransport(
|
||||
fn (array $anfrage): string => $this->fuehreHttpAnfrageAus($anfrage)
|
||||
fn (array $anfrage): string => $this->fuehreHttpAnfrageAus($anfrage, true)
|
||||
);
|
||||
$transport->ladestromSetzen(
|
||||
$this->ReadPropertyInteger('Geraetetyp'),
|
||||
@@ -601,16 +601,21 @@ class LadestationStandAlone extends IPSModule implements VerbraucherSchnittstell
|
||||
/**
|
||||
* @param array<string, mixed> $anfrage
|
||||
*/
|
||||
private function fuehreHttpAnfrageAus(array $anfrage): string
|
||||
private function fuehreHttpAnfrageAus(
|
||||
array $anfrage,
|
||||
bool $alsGeraetebefehl = false
|
||||
): string
|
||||
{
|
||||
$protokoll = [
|
||||
'Methode' => $anfrage['Methode'],
|
||||
'URL' => $anfrage['URL'],
|
||||
];
|
||||
$this->setzeSichtbareVariable(
|
||||
'LetzterGeraetebefehl',
|
||||
json_encode($protokoll, JSON_UNESCAPED_SLASHES | JSON_THROW_ON_ERROR)
|
||||
);
|
||||
if ($alsGeraetebefehl) {
|
||||
$protokoll = [
|
||||
'Methode' => $anfrage['Methode'],
|
||||
'URL' => $anfrage['URL'],
|
||||
];
|
||||
$this->setzeSichtbareVariable(
|
||||
'LetzterGeraetebefehl',
|
||||
json_encode($protokoll, JSON_UNESCAPED_SLASHES | JSON_THROW_ON_ERROR)
|
||||
);
|
||||
}
|
||||
|
||||
if ($this->ReadPropertyBoolean('Testmodus')) {
|
||||
$url = (string) $anfrage['URL'];
|
||||
|
||||
Reference in New Issue
Block a user