From f71f161e6e797787686cce95f85b15798f4785c7 Mon Sep 17 00:00:00 2001 From: Sailor <> Date: Mon, 25 Nov 2019 13:10:23 +0000 Subject: [PATCH] 73_GasCalculator.pm: bugfix: floating number flutter corrected git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@20577 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- FHEM/73_GasCalculator.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FHEM/73_GasCalculator.pm b/FHEM/73_GasCalculator.pm index e3fb91cf7..726c582c5 100644 --- a/FHEM/73_GasCalculator.pm +++ b/FHEM/73_GasCalculator.pm @@ -656,7 +656,7 @@ sub GasCalculator_Notify($$) if ($GasCountReadingTimestampDelta != 0) { ### Calculate DV (Volume difference) of previous and current value / [cubic] - my $GasCountReadingValueDelta = sprintf('%.3f', ($GasCountReadingValueCurrent - $GasCountReadingValuePrevious)); + my $GasCountReadingValueDelta = sprintf('%.3f', ($GasCountReadingValueCurrent )) - sprintf('%.3f', ($GasCountReadingValuePrevious)); Log3 $GasCalcName, 5, $GasCalcName. " : GasCalculator - GasCountReadingValueDelta : " . $GasCountReadingValueDelta . " " . $attr{$GasCalcName}{Volume}; ### Calculate Current Power P = DV/Dt[cubic/s] * GaszValue * GasNominalHeatingValue[kWh/cubic] * 3600[s/h] / SiPrefixPowerFactor