98_monitoring: fix allCount update

git-svn-id: https://svn.fhem.de/fhem/trunk@17223 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
igami 2018-08-28 15:51:43 +00:00
parent 7e1b1add28
commit 6e6238ec21

View File

@ -410,7 +410,7 @@ sub monitoring_modify($) {
return unless(defined($hash)); return unless(defined($hash));
return if(IsDisabled($SELF)); return if(IsDisabled($SELF));
my $at = eval($wait + gettimeofday()) if($wait); my $at = eval($wait + gettimeofday()) if($wait && $wait ne "quiet");
my $TYPE = $hash->{TYPE}; my $TYPE = $hash->{TYPE};
my (@change, %readings); my (@change, %readings);
%readings = map{$_, 1} split(",", ReadingsVal($SELF, $list, "")); %readings = map{$_, 1} split(",", ReadingsVal($SELF, $list, ""));
@ -441,7 +441,8 @@ sub monitoring_modify($) {
return; return;
} }
else{ else{
monitoring_modify("$SELF|warning|remove|$value") if($list eq "error"); monitoring_modify("$SELF|warning|remove|$value|quiet")
if($list eq "error");
$readings{$value} = 1; $readings{$value} = 1;
delete $hash->{READINGS}{$reading}; delete $hash->{READINGS}{$reading};
} }
@ -464,7 +465,8 @@ sub monitoring_modify($) {
readingsBulkUpdate($hash, "state", "$list $operation: $value"); readingsBulkUpdate($hash, "state", "$list $operation: $value");
readingsBulkUpdate($hash, $list, join(",", sort(keys %readings))); readingsBulkUpdate($hash, $list, join(",", sort(keys %readings)));
readingsBulkUpdate($hash, $list."Count", int(keys %readings)); readingsBulkUpdate($hash, $list."Count", int(keys %readings));
readingsBulkUpdate($hash, "allCount", $allCount); readingsBulkUpdate($hash, "allCount", $allCount)
unless($wait &&$wait eq "quiet");
readingsEndUpdate($hash, 1); readingsEndUpdate($hash, 1);
return; return;