From a251277fc190e078af5b59fc3ea6b257d942cb00 Mon Sep 17 00:00:00 2001 From: tpoitzsch Date: Fri, 9 May 2014 20:33:35 +0000 Subject: [PATCH] git-svn-id: https://svn.fhem.de/fhem/trunk@5804 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/98_statistics.pm | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/fhem/FHEM/98_statistics.pm b/fhem/FHEM/98_statistics.pm index 398c97c6f..53ef82be3 100644 --- a/fhem/FHEM/98_statistics.pm +++ b/fhem/FHEM/98_statistics.pm @@ -103,7 +103,7 @@ statistics_Define($$) return "Bad regexp: $@" if($@); $hash->{DEV_REGEXP} = $devName; - $hash->{STATE} = "active"; + $hash->{STATE} = "wating for notifications"; RemoveInternalTimer($hash); @@ -297,8 +297,12 @@ statistics_DoStatistics($$$) # Record device as monitored my $monReadingName; - if ($statisticDone ==1) { $monReadingName = "monitoredDevices".$devType; } - else {$monReadingName = "monitoredDevicesUnsupported"; $devName .= "($devType)"} + if ($statisticDone ==1) { + $monReadingName = "monitoredDevices".$devType; + readingsBulkUpdate($hash,"state","Last calculated device: $devName",1); + } else { + $monReadingName = "monitoredDevicesUnsupported"; $devName .= "($devType)", + } my $monReadingValue = ReadingsVal($hashName,$monReadingName,""); if ($monReadingValue !~ /$regExp/) { if($monReadingValue eq "") { $monReadingValue = $devName;} @@ -316,6 +320,7 @@ statistics_DoStatistics($$$) } } } + readingsEndUpdate($hash,1);