mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-10 03:06:37 +00:00
fhem.pl: add eval for diabledForIntervals (Forum #69787)
git-svn-id: https://svn.fhem.de/fhem/trunk@13840 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
d18b96609e
commit
eab055554f
@ -567,6 +567,10 @@ EOF
|
||||
<ul>
|
||||
23:00-24:00 00:00-01:00
|
||||
</ul>
|
||||
If parts of the attribute value are enclosed in {}, they are evaluated:
|
||||
<ul>
|
||||
{sunset_abs()}-24 {sunrise_abs()}-08
|
||||
</ul>
|
||||
</li><br>
|
||||
|
||||
<a name="skip_next"></a>
|
||||
@ -754,6 +758,11 @@ EOF
|
||||
<ul>
|
||||
23:00-24:00 00:00-01:00
|
||||
</ul>
|
||||
Falls Teile des Wertes in {} eingeschlossen sind, dann werden sie als
|
||||
ein Perl Ausdruck ausgewertet:
|
||||
<ul>
|
||||
{sunset_abs()}-24 {sunrise_abs()}-08
|
||||
</ul>
|
||||
</li><br>
|
||||
|
||||
<a name="skip_next"></a>
|
||||
|
@ -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)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user