mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-10 09:16:53 +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 - reading : " . $reading;
|
||||||
#Log3 $GasCalcName, 5, $GasCalcName. "_Set - value : " . $value;
|
#Log3 $GasCalcName, 5, $GasCalcName. "_Set - value : " . $value;
|
||||||
|
|
||||||
|
### For Test purpose only
|
||||||
|
push(@cList, "Test");
|
||||||
|
|
||||||
|
### Create set-List
|
||||||
if(defined($hash->{READINGS})) {
|
if(defined($hash->{READINGS})) {
|
||||||
push(@cList, "SyncCounter");
|
push(@cList, "SyncCounter");
|
||||||
push(@cList, keys(%{$hash->{READINGS}}));
|
push(@cList, keys(%{$hash->{READINGS}}));
|
||||||
@ -338,6 +341,10 @@ sub GasCalculator_Set($@)
|
|||||||
### Create ReturnMessage
|
### Create ReturnMessage
|
||||||
$ReturnMessage = $GasCalcName . " - Successfully synchromized Counter and Calculator with : " . $value . " kWh";
|
$ReturnMessage = $GasCalcName . " - Successfully synchromized Counter and Calculator with : " . $value . " kWh";
|
||||||
}
|
}
|
||||||
|
### For Test purpose only
|
||||||
|
elsif ($reading eq "Test") {
|
||||||
|
GasCalculator_MidnightTimer($hash);
|
||||||
|
}
|
||||||
elsif ($reading ne "?")
|
elsif ($reading ne "?")
|
||||||
{
|
{
|
||||||
### Create Log entries for debugging
|
### Create Log entries for debugging
|
||||||
@ -363,7 +370,7 @@ sub GasCalculator_MidnightTimer($)
|
|||||||
my $RegEx = $GasCalcDev->{REGEXP};
|
my $RegEx = $GasCalcDev->{REGEXP};
|
||||||
my ($GasCountName, $GasCountReadingRegEx) = split(":", $RegEx, 2);
|
my ($GasCountName, $GasCountReadingRegEx) = split(":", $RegEx, 2);
|
||||||
my $GasCountDev = $defs{$GasCountName};
|
my $GasCountDev = $defs{$GasCountName};
|
||||||
$GasCountReadingRegEx =~ s/[\.\*]//g;
|
$GasCountReadingRegEx =~ s/[\.\*]+$//;
|
||||||
|
|
||||||
my @GasCountReadingNameListComplete = keys(%{$GasCountDev->{READINGS}});
|
my @GasCountReadingNameListComplete = keys(%{$GasCountDev->{READINGS}});
|
||||||
my @GasCountReadingNameListFiltered;
|
my @GasCountReadingNameListFiltered;
|
||||||
@ -378,8 +385,10 @@ sub GasCalculator_MidnightTimer($)
|
|||||||
Log3 $GasCalcName, 5, $GasCalcName. " : GasCalculator_MidnightTimer__________________________________________________________";
|
Log3 $GasCalcName, 5, $GasCalcName. " : GasCalculator_MidnightTimer__________________________________________________________";
|
||||||
Log3 $GasCalcName, 5, $GasCalcName. " : GasCalculator_MidnightTimer : MidnightTimer initiated";
|
Log3 $GasCalcName, 5, $GasCalcName. " : GasCalculator_MidnightTimer : MidnightTimer initiated";
|
||||||
Log3 $GasCalcName, 5, $GasCalcName. " : GasCalculator_MidnightTimer - RegEx : " . $RegEx;
|
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 - 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
|
### Remove internal timer for GasCalculator_MidnightTimer
|
||||||
|
Loading…
x
Reference in New Issue
Block a user