mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-10 03:06:37 +00:00
73_GasCalculator: Bugfix - Handling of Readnings with .
git-svn-id: https://svn.fhem.de/fhem/trunk@23698 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
1ad7f17ebb
commit
960ac6b1fa
@ -286,7 +286,10 @@ sub GasCalculator_Set($@)
|
||||
#Log3 $GasCalcName, 5, $GasCalcName. "_Set - reading : " . $reading;
|
||||
#Log3 $GasCalcName, 5, $GasCalcName. "_Set - value : " . $value;
|
||||
|
||||
### For Test purpose only
|
||||
push(@cList, "Test");
|
||||
|
||||
### Create set-List
|
||||
if(defined($hash->{READINGS})) {
|
||||
push(@cList, "SyncCounter");
|
||||
push(@cList, keys(%{$hash->{READINGS}}));
|
||||
@ -338,6 +341,10 @@ sub GasCalculator_Set($@)
|
||||
### Create ReturnMessage
|
||||
$ReturnMessage = $GasCalcName . " - Successfully synchromized Counter and Calculator with : " . $value . " kWh";
|
||||
}
|
||||
### For Test purpose only
|
||||
elsif ($reading eq "Test") {
|
||||
GasCalculator_MidnightTimer($hash);
|
||||
}
|
||||
elsif ($reading ne "?")
|
||||
{
|
||||
### Create Log entries for debugging
|
||||
@ -363,7 +370,7 @@ sub GasCalculator_MidnightTimer($)
|
||||
my $RegEx = $GasCalcDev->{REGEXP};
|
||||
my ($GasCountName, $GasCountReadingRegEx) = split(":", $RegEx, 2);
|
||||
my $GasCountDev = $defs{$GasCountName};
|
||||
$GasCountReadingRegEx =~ s/[\.\*]//g;
|
||||
$GasCountReadingRegEx =~ s/[\.\*]+$//;
|
||||
|
||||
my @GasCountReadingNameListComplete = keys(%{$GasCountDev->{READINGS}});
|
||||
my @GasCountReadingNameListFiltered;
|
||||
@ -378,8 +385,10 @@ sub GasCalculator_MidnightTimer($)
|
||||
Log3 $GasCalcName, 5, $GasCalcName. " : GasCalculator_MidnightTimer__________________________________________________________";
|
||||
Log3 $GasCalcName, 5, $GasCalcName. " : GasCalculator_MidnightTimer : MidnightTimer initiated";
|
||||
Log3 $GasCalcName, 5, $GasCalcName. " : GasCalculator_MidnightTimer - RegEx : " . $RegEx;
|
||||
Log3 $GasCalcName, 5, $GasCalcName. " : GasCalculator_MidnightTimer - ReadingRegEx : " . $GasCountReadingRegEx;
|
||||
Log3 $GasCalcName, 5, $GasCalcName. " : GasCalculator_MidnightTimer - GasCountName : " . $GasCountName;
|
||||
Log3 $GasCalcName, 5, $GasCalcName. " : GasCalculator_MidnightTimer - GasCountReadList: " . Dumper(@GasCountReadingNameListFiltered);
|
||||
Log3 $GasCalcName, 5, $GasCalcName. " : GasCalculator_MidnightTimer - GasCountReadCompl : \n" . Dumper(@GasCountReadingNameListComplete);
|
||||
Log3 $GasCalcName, 5, $GasCalcName. " : GasCalculator_MidnightTimer - GasCountReadList : \n" . Dumper(@GasCountReadingNameListFiltered);
|
||||
|
||||
|
||||
### Remove internal timer for GasCalculator_MidnightTimer
|
||||
|
Loading…
x
Reference in New Issue
Block a user