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)