diff --git a/fhem/CHANGED b/fhem/CHANGED index b90c9b9c7..3504d36aa 100644 --- a/fhem/CHANGED +++ b/fhem/CHANGED @@ -21,6 +21,7 @@ - bugfix: XmlList special handling - bugfix: CUL_WS rain sensor corr1 fix - feature: FHEMWEB stylesheet attribute repaced with stylesheetPrefix + - feature: notify attribute forwardReturnValue - 2011-07-08 (5.1) diff --git a/fhem/FHEM/91_notify.pm b/fhem/FHEM/91_notify.pm index 7cdf8c475..deaf9c53a 100755 --- a/fhem/FHEM/91_notify.pm +++ b/fhem/FHEM/91_notify.pm @@ -14,7 +14,7 @@ notify_Initialize($) $hash->{DefFn} = "notify_Define"; $hash->{NotifyFn} = "notify_Exec"; $hash->{AttrFn} = "notify_Attr"; - $hash->{AttrList} = "disable:0,1"; + $hash->{AttrList} = "disable:0,1 forwardReturnValue:0,1 loglevel:0,1,2,3,4,5,6"; } @@ -67,6 +67,7 @@ notify_Exec($$) $found = ("$n:$s" =~ m/^$re$/); } if($found) { + Log GetLogLevel($ln, 5), "Triggering $ln"; my (undef, $exec) = split("[ \t]+", $ntfy->{DEF}, 2); my %specials= ( @@ -77,11 +78,12 @@ notify_Exec($$) $exec= EvalSpecials($exec, %specials); my $r = AnalyzeCommandChain(undef, $exec); - Log 3, $r if($r); + Log GetLogLevel($ln, 3), "$ln return value: $r" if($r); $ret .= " $r" if($r); } } - return $ret; + return $ret if(AttrVal($ln, "forwardReturnValue", 0)); + return undef; } sub diff --git a/fhem/docs/commandref.html b/fhem/docs/commandref.html index 0a44e656d..b3edb6f60 100644 --- a/fhem/docs/commandref.html +++ b/fhem/docs/commandref.html @@ -6748,10 +6748,9 @@ href="http://www.elv.de/output/controller.aspx?cid=74&detail=10&detail2=29870">U