mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 18:59:33 +00:00
98_DOIF.pm: $hs=$hash in CmdDoIfPerl for subs block, delete timer reading in DOIF_ExecTimer moved forward
git-svn-id: https://svn.fhem.de/fhem/trunk@17677 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
f865ab0821
commit
946d046a33
@ -2837,7 +2837,7 @@ CmdDoIfPerl($$)
|
|||||||
my $ret;
|
my $ret;
|
||||||
my $err="";
|
my $err="";
|
||||||
my $i=0;
|
my $i=0;
|
||||||
|
$hs=$hash;
|
||||||
#def modify
|
#def modify
|
||||||
if ($init_done)
|
if ($init_done)
|
||||||
{
|
{
|
||||||
@ -3296,6 +3296,7 @@ sub DOIF_ExecTimer
|
|||||||
my $subname=${$timer}->{subname};
|
my $subname=${$timer}->{subname};
|
||||||
my $param=${$timer}->{param} if (defined ${$timer}->{param});
|
my $param=${$timer}->{param} if (defined ${$timer}->{param});
|
||||||
$hs=$hash;
|
$hs=$hash;
|
||||||
|
delete ($::defs{$name}{READINGS}{"timer_$timername"});
|
||||||
if (!defined ($param)) {
|
if (!defined ($param)) {
|
||||||
eval ("package DOIF;$subname");
|
eval ("package DOIF;$subname");
|
||||||
} else {
|
} else {
|
||||||
@ -3306,7 +3307,6 @@ sub DOIF_ExecTimer
|
|||||||
::Log3 ($::defs{$name}{NAME},1 , "$name error in $subname: $@");
|
::Log3 ($::defs{$name}{NAME},1 , "$name error in $subname: $@");
|
||||||
::readingsSingleUpdate ($hash, "error", "in $subname: $@",0);
|
::readingsSingleUpdate ($hash, "error", "in $subname: $@",0);
|
||||||
}
|
}
|
||||||
delete ($::defs{$name}{READINGS}{"timer_$timername"});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sub set_Exec
|
sub set_Exec
|
||||||
@ -6069,7 +6069,7 @@ subs {<br>
|
|||||||
set_Exec ("$window",1800,"logwin",$window); # setze Timer auf 30 Minuten für eine wiederholte Meldung<br>
|
set_Exec ("$window",1800,"logwin",$window); # setze Timer auf 30 Minuten für eine wiederholte Meldung<br>
|
||||||
}<br>
|
}<br>
|
||||||
}<br>
|
}<br>
|
||||||
{ if (["_window$:open"]) {set_Exec ("$DEVICE",600,'logwin("$DEVICE")')}} # wenn, Fenster geöffnet wird, dann setze Timer auf Funktion zum Loggen namens "logwin"<br>
|
{ if (["_window$:open"]) {set_Exec ("$DEVICE",600,'logwin',"$DEVICE")}} # wenn, Fenster geöffnet wird, dann setze Timer auf Funktion zum Loggen namens "logwin"<br>
|
||||||
{ if (["_window$:closed"]) {del_Exec ("$DEVICE")}} # wenn, Fenster geschlossen wird, dann lösche Timer<br>
|
{ if (["_window$:closed"]) {del_Exec ("$DEVICE")}} # wenn, Fenster geschlossen wird, dann lösche Timer<br>
|
||||||
</code>
|
</code>
|
||||||
</ul>
|
</ul>
|
||||||
|
Loading…
Reference in New Issue
Block a user