2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 06:39:11 +00:00

90_at.pm: add $SELF to avoid discussion. Forum (123956)

git-svn-id: https://svn.fhem.de/fhem/trunk@25234 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2021-11-16 10:20:37 +00:00
parent b5625df4b8
commit 7665d72f0b

View File

@ -93,7 +93,7 @@ at_Define($$)
return "datespec is not allowed with +" if($abstime && $rel);
if($hash->{CL}) { # Do not check this for definition
$err = perlSyntaxCheck($command, ());
$err = perlSyntaxCheck($command, ("%SELF" => $name) );
return $err if($err);
}
@ -194,7 +194,8 @@ at_Exec($)
if(!$skip && !IsDisabled($name)) {
Log3 $name, 5, "exec at command $name";
my $ret = AnalyzeCommandChain(undef, SemicolonEscape($hash->{COMMAND}));
my %sp = ( "%SELF" => $name );
my $ret = AnalyzeCommandChain(undef, EvalSpecials($hash->{"COMMAND"}, %sp));
Log3 $name, 3, "$name: $ret" if($ret);
}
@ -281,7 +282,8 @@ at_Set($@)
} elsif($a[1] eq "execNow") {
my $name = $hash->{NAME};
my $ret = AnalyzeCommandChain(undef, SemicolonEscape($hash->{COMMAND}));
my %sp = ( "%SELF" => $name );
my $ret = AnalyzeCommandChain(undef, EvalSpecials($hash->{"COMMAND"}, %sp));
Log3 $name, 3, "$name: $ret" if($ret);
} elsif($a[1] eq "skip_next") {