From b7b2e64cefca78839e3484d3673b903ba88d27a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20H=C3=A4fliger?= Date: Tue, 24 Jun 2025 16:51:01 +0200 Subject: [PATCH] no message --- PV_Visu/module.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PV_Visu/module.php b/PV_Visu/module.php index 1240ed9..50d7166 100644 --- a/PV_Visu/module.php +++ b/PV_Visu/module.php @@ -107,9 +107,9 @@ class PV_Visu extends IPSModule $feed = $this->GetDailyTotal($this->ReadPropertyInteger('VarFeedIn'), $start, $end); $grid = $this->GetDailyTotal($this->ReadPropertyInteger('VarGrid'), $start, $end); - $prodCons = $prod > 0 ? ($cons / $prod) * 100 : 0; + $prodCons = $prod > 0 ? (($cons-$grid) / $prod) * 100 : 0; $prodFeed = $prod > 0 ? ($feed / $prod) * 100 : 0; - $consPV = $cons > 0 ? min($prod, $cons) / $cons * 100 : 0; + $consPV = $cons > 0 ? min($prod, ($cons-$grid)) / $cons * 100 : 0; $consGrid = $cons > 0 ? ($grid / $cons) * 100 : 0; $data = [