mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-06 12:18:46 +00:00
- Boris Sat Dec 29 16:56:00 CET 2007
- %NAME, %EVENT, %TYPE parameters in notify definition, commandref.html update git-svn-id: https://svn.fhem.de/fhem/trunk@137 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
2d7f7e5d24
commit
443495f1d1
@ -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;
|
||||
|
@ -1019,12 +1019,20 @@ split in multiple lines<br><br>
|
||||
<li>The character <code>%</code> will be replaced with the received event,
|
||||
e.g. with <code>on</code> or <code>off</code> or <code>measured-temp: 21.7
|
||||
(Celsius)</code><br> It is advisable to put the <code>%</code> into double
|
||||
quotes, else the shell may get a syntax error.<br>
|
||||
To use % or @ in the text itself, use the double mode (%% or @@)</li>
|
||||
|
||||
quotes, else the shell may get a syntax error.</li>
|
||||
|
||||
<li>The character <code>@</code> will be replaced with the device
|
||||
name.</li>
|
||||
|
||||
<li>To use % or @ in the text itself, use the double mode (%% or @@).</li>
|
||||
|
||||
<li>Instead of <code>%</code> and <code>@</code>, the parameters
|
||||
<code>%EVENT</code> (same as <code>%</code>), <code>%NAME</code>
|
||||
(same as <code>@</code>) and <code>%TYPE</code> (contains the device
|
||||
type, e.g. <code>FHT</code>) can be used. A single <code>%</code>
|
||||
looses its special meaning if any of these parameters appears in the
|
||||
definition.</li>
|
||||
|
||||
<li><code><pattern></code> may also be a compound of
|
||||
<code>definition:event</code> to filter for events.</li>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user