diff --git a/fhem/FHEM/91_notify.pm b/fhem/FHEM/91_notify.pm index 8e587c539..32e6a6537 100755 --- a/fhem/FHEM/91_notify.pm +++ b/fhem/FHEM/91_notify.pm @@ -63,7 +63,13 @@ notify_Exec($$) my $exec = $log->{CMD}; $exec =~ s/%%/____/g; - $exec =~ s/%/$s/g; + my $extsyntax= 0; + $extsyntax+= ($exec =~ s/%TYPE/$t/g); + $extsyntax+= ($exec =~ s/%NAME/$n/g); + $extsyntax+= ($exec =~ s/%EVENT/$s/g); + if(!$extsyntax) { + $exec =~ s/%/$s/g; + } $exec =~ s/____/%/g; $exec =~ s/@@/____/g; diff --git a/fhem/docs/commandref.html b/fhem/docs/commandref.html index a60abd932..78864b923 100644 --- a/fhem/docs/commandref.html +++ b/fhem/docs/commandref.html @@ -1019,12 +1019,20 @@ split in multiple lines

  • The character % will be replaced with the received event, e.g. with on or off or measured-temp: 21.7 (Celsius)
    It is advisable to put the % into double - quotes, else the shell may get a syntax error.
    - To use % or @ in the text itself, use the double mode (%% or @@)
  • - + quotes, else the shell may get a syntax error. +
  • The character @ will be replaced with the device name.
  • +
  • To use % or @ in the text itself, use the double mode (%% or @@).
  • + +
  • Instead of % and @, the parameters + %EVENT (same as %), %NAME + (same as @) and %TYPE (contains the device + type, e.g. FHT) can be used. A single % + looses its special meaning if any of these parameters appears in the + definition.
  • +
  • <pattern> may also be a compound of definition:event to filter for events.