From 3be2787f344354684a36cb17358f80d57e6ee80c Mon Sep 17 00:00:00 2001 From: tupol Date: Fri, 9 Mar 2018 09:01:35 +0000 Subject: [PATCH] statistics: NOTIFYDEV git-svn-id: https://svn.fhem.de/fhem/trunk@16357 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/98_statistics.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fhem/FHEM/98_statistics.pm b/fhem/FHEM/98_statistics.pm index c5c391b59..59fb25a5c 100644 --- a/fhem/FHEM/98_statistics.pm +++ b/fhem/FHEM/98_statistics.pm @@ -124,7 +124,6 @@ sub statistics_Initialize($) $hash->{DefFn} = "statistics_Define"; $hash->{UndefFn} = "statistics_Undefine"; $hash->{NotifyFn} = "statistics_Notify"; - $hash->{NOTIFYDEV} = "global"; $hash->{SetFn} = "statistics_Set"; $hash->{NotifyOrderPrefix} = "10-"; # Want to be called before the rest @@ -155,7 +154,7 @@ sub statistics_Define($$) my $name = $a[0]; my $devName = $a[2]; - + if (@a == 4) {$hash->{PREFIX} = $a[3];} else {$hash->{PREFIX} = "stat";} @@ -163,6 +162,9 @@ sub statistics_Define($$) return "Bad regexp: $@" if($@); $hash->{DEV_REGEXP} = $devName; + # Only global and the devices in devName should trigger the notify sub of statistics + $hash->{NOTIFYDEV} = "global,".$devName; + $hash->{STATE} = "Waiting for notifications"; $hash->{fhem}{modulVersion} = '$Date$'; @@ -1158,7 +1160,6 @@ sub statistics_UpdateDevReading($$$$)

statistics

-(en | de)