98_WeekdayTimer, 98_Heating_Control: another issue fixed in conjunction with @ % in the context of Attribute delayedExecutionCond
git-svn-id: https://svn.fhem.de/fhem/trunk@10077 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
@@ -753,16 +753,28 @@ sub WeekdayTimer_FensterOffen ($$$) {
|
||||
my ($hash, $event, $time) = @_;
|
||||
my $name = $hash->{NAME};
|
||||
|
||||
my $verzoegerteAusfuehrungCond = AttrVal($hash->{NAME}, "delayedExecutionCond", "0");
|
||||
|
||||
my %specials= (
|
||||
"%HEATING_CONTROL" => $hash->{NAME},
|
||||
"%WEEKDAYTIMER" => $hash->{NAME},
|
||||
"%NAME" => $hash->{DEVICE},
|
||||
"%EVENT" => $event
|
||||
my %specials = (
|
||||
'%HEATING_CONTROL' => $hash->{NAME},
|
||||
'%WEEKDAYTIMER' => $hash->{NAME},
|
||||
'%NAME' => $hash->{DEVICE},
|
||||
'%EVENT' => $event,
|
||||
'$HEATING_CONTROL' => $hash->{NAME},
|
||||
'$WEEKDAYTIMER' => $hash->{NAME},
|
||||
'$NAME' => $hash->{DEVICE},
|
||||
'$EVENT' => $event,
|
||||
);
|
||||
$verzoegerteAusfuehrungCond = EvalSpecials($verzoegerteAusfuehrungCond, %specials);
|
||||
|
||||
my $verzoegerteAusfuehrungCond = AttrVal($hash->{NAME}, "delayedExecutionCond", "0");
|
||||
#$verzoegerteAusfuehrungCond = 'xxx(%WEEKDAYTIMER,%NAME,%HEATING_CONTROL,$WEEKDAYTIMER,$EVENT,$NAME,$HEATING_CONTROL)';
|
||||
|
||||
map { my $key = $_; $key =~ s/\$/\\\$/g;
|
||||
my $val = $specials{$_};
|
||||
$verzoegerteAusfuehrungCond =~ s/$key/$val/g
|
||||
} keys %specials;
|
||||
Log3 $hash, 5, "[$name] delayedExecutionCond:$verzoegerteAusfuehrungCond";
|
||||
|
||||
my $verzoegerteAusfuehrung = eval($verzoegerteAusfuehrungCond);
|
||||
Log3 $hash, 5, "[$name] result of delayedExecutionCond:$verzoegerteAusfuehrung";
|
||||
|
||||
if ($verzoegerteAusfuehrung) {
|
||||
if (!defined($hash->{VERZOEGRUNG})) {
|
||||
|
||||
Reference in New Issue
Block a user