fix(easee): veraltete Ladeleistung nach Ladestopp nullen
Tests / test (push) Successful in 50s

This commit is contained in:
dh
2026-09-29 13:15:43 +00:00
parent ace1821213
commit 37400878b6
2 changed files with 36 additions and 4 deletions
+9 -4
View File
@@ -53,11 +53,16 @@ final class EaseeLadestatus
? self::phasenzahl((int) ($beobachtungen['110'] ?? 0))
: 0;
$leistung = max(0.0, (float) ($beobachtungen['120'] ?? 0.0) * 1000.0);
$laedt = $betriebszustand === 3;
$leistung = $laedt
? max(0.0, (float) ($beobachtungen['120'] ?? 0.0) * 1000.0)
: 0.0;
$stroeme = [];
foreach ([182, 183, 184, 185] as $id) {
if (array_key_exists((string) $id, $beobachtungen)) {
$stroeme[] = abs((float) $beobachtungen[(string) $id]);
if ($laedt) {
foreach ([182, 183, 184, 185] as $id) {
if (array_key_exists((string) $id, $beobachtungen)) {
$stroeme[] = abs((float) $beobachtungen[(string) $id]);
}
}
}
$ladestrom = $stroeme === [] ? 0.0 : max($stroeme);