fix(ladestation): Steuerbefehle in Diagnose erhalten
Tests / test (push) Canceled after 0s

This commit is contained in:
dh
2026-09-30 04:37:33 +00:00
parent faa5dfb33f
commit bfdcf4536b
2 changed files with 16 additions and 11 deletions
+15 -10
View File
@@ -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'];