From 7665d72f0b3b83a6ffb5466a5422f55f5b91f98b Mon Sep 17 00:00:00 2001 From: rudolfkoenig <> Date: Tue, 16 Nov 2021 10:20:37 +0000 Subject: [PATCH] 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 --- fhem/FHEM/90_at.pm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/fhem/FHEM/90_at.pm b/fhem/FHEM/90_at.pm index 50a9b6ce5..8d1577ab9 100644 --- a/fhem/FHEM/90_at.pm +++ b/fhem/FHEM/90_at.pm @@ -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") {