no message

This commit is contained in:
dh
2025-06-24 17:19:09 +02:00
parent b473246b83
commit 5c105ff95c
2 changed files with 3 additions and 4 deletions
+1 -1
View File
@@ -49,7 +49,7 @@
document.getElementById('barGridText').innerText = data.consGrid + '%'; document.getElementById('barGridText').innerText = data.consGrid + '%';
// Set detailed values below // Set detailed values below
document.getElementById('prodValues').innerText = 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'; 'Einspeisung: ' + data.value.feed + ' kWh';
document.getElementById('consValues').innerText = document.getElementById('consValues').innerText =
'PV-Anteil: ' + data.consPV/100*data.value.cons + ' kWh, ' + 'PV-Anteil: ' + data.consPV/100*data.value.cons + ' kWh, ' +
+2 -3
View File
@@ -77,9 +77,9 @@ class PV_Visu extends IPSModule
$grid = $this->GetDailyTotal($this->ReadPropertyInteger('VarGrid'), $start, $end); $grid = $this->GetDailyTotal($this->ReadPropertyInteger('VarGrid'), $start, $end);
$prodCons = $prod > 0 ? (($cons-$grid) / $prod) * 100 : 0; $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; $consPV = $cons > 0 ? min($prod, ($cons-$grid)) / $cons * 100 : 0;
$consGrid = $cons > 0 ? ($grid / $cons) * 100 : 0; $consGrid = $cons > 0 ? 100 - $consPV : 0;
$data = [ $data = [
'prodCons' => round($prodCons, 1), 'prodCons' => round($prodCons, 1),
@@ -95,7 +95,6 @@ class PV_Visu extends IPSModule
]; ];
$json = json_encode($data); $json = json_encode($data);
IPS_LogMessage("TEST", print_r($data));
$this->UpdateVisualizationValue($json); $this->UpdateVisualizationValue($json);
} }