no message

This commit is contained in:
2025-06-24 14:27:03 +02:00
parent 8c4430f444
commit c06141672d

View File

@@ -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'];
}
}