mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-10 09:16:53 +00:00
getAllSets space filtering bugfix
git-svn-id: https://svn.fhem.de/fhem/trunk@1711 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
f4e8a7248b
commit
b8074c5326
18
fhem/fhem.pl
18
fhem/fhem.pl
@ -81,6 +81,7 @@ sub devspec2array($);
|
|||||||
sub doGlobalDef($);
|
sub doGlobalDef($);
|
||||||
sub fhem($);
|
sub fhem($);
|
||||||
sub fhz($);
|
sub fhz($);
|
||||||
|
sub getAllSets($);
|
||||||
sub IsDummy($);
|
sub IsDummy($);
|
||||||
sub IsIgnored($);
|
sub IsIgnored($);
|
||||||
sub setGlobalAttrBeforeFork($);
|
sub setGlobalAttrBeforeFork($);
|
||||||
@ -1578,8 +1579,8 @@ getAllSets($)
|
|||||||
|
|
||||||
my $em = AttrVal($d, "eventMap", undef);
|
my $em = AttrVal($d, "eventMap", undef);
|
||||||
if($em) {
|
if($em) {
|
||||||
$em = join(" ", map { $_ =~ s/.*://s; $_ }
|
$em = join(" ", grep { !/ / }
|
||||||
grep { !/ / }
|
map { $_ =~ s/.*://s; $_ }
|
||||||
EventMapAsList($em));
|
EventMapAsList($em));
|
||||||
$a2 = "$em $a2";
|
$a2 = "$em $a2";
|
||||||
}
|
}
|
||||||
@ -2163,7 +2164,7 @@ DoTrigger($$)
|
|||||||
my $re = $inform{$c}{regexp};
|
my $re = $inform{$c}{regexp};
|
||||||
for(my $i = 0; $i < $max; $i++) {
|
for(my $i = 0; $i < $max; $i++) {
|
||||||
my $state = $defs{$dev}{CHANGED}[$i];
|
my $state = $defs{$dev}{CHANGED}[$i];
|
||||||
next if($re && $state !~ m/$re/);
|
next if($re && !($dev =~ m/$re/ || "$dev:$state" =~ m/$re/));
|
||||||
syswrite($defs{$c}{CD},
|
syswrite($defs{$c}{CD},
|
||||||
($inform{$c}{type} eq "timer" ? "$tn " : "") .
|
($inform{$c}{type} eq "timer" ? "$tn " : "") .
|
||||||
"$defs{$dev}{TYPE} $dev $state\n");
|
"$defs{$dev}{TYPE} $dev $state\n");
|
||||||
@ -2949,15 +2950,4 @@ fhemTimeLocal($$$$$$) {
|
|||||||
return $t-fhemTzOffset($t);
|
return $t-fhemTzOffset($t);
|
||||||
}
|
}
|
||||||
|
|
||||||
sub
|
|
||||||
secSince2000()
|
|
||||||
{
|
|
||||||
# Calculate the local time in seconds from 2000.
|
|
||||||
my $t = time();
|
|
||||||
my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime($t);
|
|
||||||
$t -= 946684800; # seconds between 01.01.2000, 00:00 and THE EPOCH (1970)
|
|
||||||
$t -= fhemTzOffset($t);
|
|
||||||
return $t;
|
|
||||||
}
|
|
||||||
|
|
||||||
1;
|
1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user