From c42bf22e2f15017380344cd767d7a297b10677e4 Mon Sep 17 00:00:00 2001
From: rudolfkoenig <>
Date: Wed, 29 Mar 2017 07:52:29 +0000
Subject: [PATCH] fhem.pl: add eval for diabledForIntervals (Forum #69787)
git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@13840 2b470e98-0d58-463d-a4d8-8e2adae1ed80
---
FHEM/90_at.pm | 9 +++++++++
fhem.pl | 1 +
2 files changed, 10 insertions(+)
diff --git a/FHEM/90_at.pm b/FHEM/90_at.pm
index b34b8bdd9..f85727176 100755
--- a/FHEM/90_at.pm
+++ b/FHEM/90_at.pm
@@ -567,6 +567,10 @@ EOF
+ If parts of the attribute value are enclosed in {}, they are evaluated:
+
+ {sunset_abs()}-24 {sunrise_abs()}-08
+
@@ -754,6 +758,11 @@ EOF
+ Falls Teile des Wertes in {} eingeschlossen sind, dann werden sie als
+ ein Perl Ausdruck ausgewertet:
+
+ {sunset_abs()}-24 {sunrise_abs()}-08
+
diff --git a/fhem.pl b/fhem.pl
index 656fb8d3e..f9c94df8f 100755
--- a/fhem.pl
+++ b/fhem.pl
@@ -785,6 +785,7 @@ IsDisabled($)
my $dfi = $attr{$devname}{disabledForIntervals};
if(defined($dfi)) {
+ $dfi =~ s/{([^\x7d]*)}/$cmdFromAnalyze=$1; eval $1/ge; # Forum #69787
my ($sec,$min,$hour,$mday,$month,$year,$wday,$yday,$isdst) = localtime;
my $dhms = sprintf("%s\@%02d:%02d:%02d", $wday, $hour, $min, $sec);
foreach my $ft (split(" ", $dfi)) {