mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-04 22:19:38 +00:00
git-svn-id: https://svn.fhem.de/fhem/trunk@11810 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
6b973c3d34
commit
a2d546a71d
@ -130,6 +130,8 @@ PRESENCE_Define($$)
|
|||||||
$hash->{TIMEOUT_NORMAL} = ($4 ne "" ? $4 : 30);
|
$hash->{TIMEOUT_NORMAL} = ($4 ne "" ? $4 : 30);
|
||||||
$hash->{TIMEOUT_PRESENT} = ($5 ne "" ? $5 : $hash->{TIMEOUT_NORMAL});
|
$hash->{TIMEOUT_PRESENT} = ($5 ne "" ? $5 : $hash->{TIMEOUT_NORMAL});
|
||||||
|
|
||||||
|
delete($hash->{helper}{ADDRESS});
|
||||||
|
|
||||||
if($hash->{helper}{call} =~ /\|/)
|
if($hash->{helper}{call} =~ /\|/)
|
||||||
{
|
{
|
||||||
my $msg = "The command contains a pipe ( | ) symbol, which is not allowed.";
|
my $msg = "The command contains a pipe ( | ) symbol, which is not allowed.";
|
||||||
@ -211,8 +213,9 @@ PRESENCE_Define($$)
|
|||||||
return $msg;
|
return $msg;
|
||||||
}
|
}
|
||||||
|
|
||||||
delete $hash->{helper}{cachednr} if(defined($hash->{helper}{cachednr}));
|
delete($hash->{helper}{cachednr});
|
||||||
|
|
||||||
|
return undef;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -298,9 +301,9 @@ PRESENCE_Set($@)
|
|||||||
elsif(defined($powerCmd) && $a[1] eq "power")
|
elsif(defined($powerCmd) && $a[1] eq "power")
|
||||||
{
|
{
|
||||||
my %specials= (
|
my %specials= (
|
||||||
"%NAME" => $name,
|
'%NAME' => $name,
|
||||||
"%ADDRESS" => $hash->{ADDRESS},
|
'%ADDRESS' => (defined($hash->{ADDRESS}) ? $hash->{ADDRESS} : ""),
|
||||||
"%ARGUMENT" => (defined($a[2]) ? $a[2] : "")
|
'%ARGUMENT' => (defined($a[2]) ? $a[2] : "")
|
||||||
);
|
);
|
||||||
|
|
||||||
$powerCmd = EvalSpecials($powerCmd, %specials);
|
$powerCmd = EvalSpecials($powerCmd, %specials);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user