From c06141672d9ee6e158261b0c0d206fbbd8f9d491 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20H=C3=A4fliger?= Date: Tue, 24 Jun 2025 14:27:03 +0200 Subject: [PATCH] no message --- PV_Visu/module.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/PV_Visu/module.php b/PV_Visu/module.php index 768fcae..6a4d09c 100644 --- a/PV_Visu/module.php +++ b/PV_Visu/module.php @@ -76,7 +76,7 @@ class PV_Visu extends IPSModule if ($Ident === 'update') { $this->UpdateData(); } else { - throw new \UnexpectedValueException("Unknown Ident $Ident"); + throw new UnexpectedValueException("Unknown Ident $Ident"); } } @@ -123,11 +123,15 @@ class PV_Visu extends IPSModule if ($varID <= 0) { return 0.0; } - $archives = IPS_GetInstanceListByModuleID('{43192F11-5B02-4B5D-9B53-8B4DBD4769E9}'); + $archives = IPS_GetInstanceListByModuleID('{43192F0B-135B-4CE7-A0A7-1475603F3060}'); if (empty($archives)) { return 0.0; } $values = AC_GetAggregatedValues($archives[0], $varID, 1, $start, $end, 1); - return empty($values) ? 0.0 : (float) $values[0]['Avg']; + if (empty($values)) { + return 0.0; + } + // Für Zähler den Summenwert nutzen + return (float)$values[0]['Sum']; } } \ No newline at end of file