2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-04 05:16:45 +00:00

73_ElectricityCalculator: bugfix: Reset for calendar year fixed

git-svn-id: https://svn.fhem.de/fhem/trunk@12964 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
Sailor 2017-01-05 20:19:39 +00:00
parent a8a13e24ac
commit 3cd148e3b6

View File

@ -528,7 +528,7 @@ sub ElectricityCalculator_Notify($$)
### If not: save value and quit loop
else
{
### Write current electric Energy as previous Voulume for future use in the ElectricityCalc-Device
### Write current electric Energy as previous Value for future use in the ElectricityCalc-Device
readingsSingleUpdate( $ElectricityCalcReadingDestinationDevice, "." . $ElectricityCalcReadingPrefix. "_PrevRead", sprintf('%.3f', ($ElectricityCountReadingValueCurrent)),1);
### Create Log entries for debugging
@ -665,7 +665,7 @@ sub ElectricityCalculator_Notify($$)
}
### Check whether the current value is the first one of the calendar year
if ($ElectricityCountReadingTimestampCurrentYear < $ElectricityCountReadingTimestampPreviousYear)
if ($ElectricityCountReadingTimestampCurrentYear > $ElectricityCountReadingTimestampPreviousYear)
{
### Create Log entries for debugging
Log3 $ElectricityCalcName, 5, $ElectricityCalcName. " : ElectricityCalculator - First reading of calendar year detected";