no message

This commit is contained in:
2025-06-24 17:19:09 +02:00
parent b473246b83
commit 5c105ff95c
2 changed files with 3 additions and 4 deletions

View File

@@ -49,7 +49,7 @@
document.getElementById('barGridText').innerText = data.consGrid + '%';
// Set detailed values below
document.getElementById('prodValues').innerText =
'Eigenverbrauch: ' + data.prodCons/100*data.value.prod + ' kWh, ' +
'Eigenverbrauch: ' + data.consPV/100*data.value.cons + ' kWh, ' +
'Einspeisung: ' + data.value.feed + ' kWh';
document.getElementById('consValues').innerText =
'PV-Anteil: ' + data.consPV/100*data.value.cons + ' kWh, ' +

View File

@@ -77,9 +77,9 @@ class PV_Visu extends IPSModule
$grid = $this->GetDailyTotal($this->ReadPropertyInteger('VarGrid'), $start, $end);
$prodCons = $prod > 0 ? (($cons-$grid) / $prod) * 100 : 0;
$prodFeed = $prod > 0 ? ($feed / $prod) * 100 : 0;
$prodFeed = $prod > 0 ? 100 - $prodCons : 0;
$consPV = $cons > 0 ? min($prod, ($cons-$grid)) / $cons * 100 : 0;
$consGrid = $cons > 0 ? ($grid / $cons) * 100 : 0;
$consGrid = $cons > 0 ? 100 - $consPV : 0;
$data = [
'prodCons' => round($prodCons, 1),
@@ -95,7 +95,6 @@ class PV_Visu extends IPSModule
];
$json = json_encode($data);
IPS_LogMessage("TEST", print_r($data));
$this->UpdateVisualizationValue($json);
}