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:
parent
a8a13e24ac
commit
3cd148e3b6
@ -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";
|
||||
|
Loading…
x
Reference in New Issue
Block a user