mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 12:49:34 +00:00
73_ElectricityCalculator.pm: bugfix: floating number flutter corrected
git-svn-id: https://svn.fhem.de/fhem/trunk@20576 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
545b3c9bc6
commit
24e23929c9
@ -694,7 +694,7 @@ sub ElectricityCalculator_Notify($$)
|
||||
if ($ElectricityCountReadingTimestampDelta > 1)
|
||||
{
|
||||
### Calculate DW (electric Energy difference) of previous and current value / [kWh]
|
||||
my $ElectricityCountReadingValueDelta = sprintf('%.3f', ($ElectricityCountReadingValueCurrent - $ElectricityCountReadingValuePrevious));
|
||||
my $ElectricityCountReadingValueDelta = sprintf('%.3f', ($ElectricityCountReadingValueCurrent)) - sprintf('%.3f', ($ElectricityCountReadingValuePrevious));
|
||||
Log3 $ElectricityCalcName, 5, $ElectricityCalcName. " : ElectricityCalculator - ElectricityCountReadingValueDelta : " . $ElectricityCountReadingValueDelta;
|
||||
|
||||
### Calculate Current Power P = DW/Dt[kWh/s] * 3600[s/h] * 1000 [1/k] / SiPrefixPowerFactor
|
||||
|
Loading…
Reference in New Issue
Block a user