33_readingsGroup.pm: fixed triggering duplicate events (forum:40635,41656)
git-svn-id: svn://svn.code.sf.net/p/fhem/code/trunk@9379 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
@@ -164,7 +164,7 @@ readingsGroup_updateDevices($;$)
|
||||
my $regex = $list[$i];
|
||||
while ($regex
|
||||
&& ( ($regex =~ m/^</ && $regex !~ m/>$/) #handle , in <...>
|
||||
|| ($regex =~ m/@\{/ && $regex !~ m/}$/) #handle , in reading@{...}
|
||||
|| ($regex =~ m/@\{/ && $regex !~ m/\}$/) #handle , in reading@{...}
|
||||
|| ($regex =~ m/^\$.*\(/ && $regex !~ m/\)/) ) #handle , in $<calc>(...)
|
||||
&& defined($list[++$i]) ) {
|
||||
$regex .= ",". $list[$i];
|
||||
@@ -748,14 +748,13 @@ readingsGroup_2html($;$)
|
||||
my $first = 1;
|
||||
my $multi = @list;
|
||||
my $cell_column = 1;
|
||||
#foreach my $regex (@list) {
|
||||
for( my $i = 0; $i <= $#list; ++$i ) {
|
||||
my $name = $name;
|
||||
my $name2 = $name2;
|
||||
my $regex = $list[$i];
|
||||
while ($regex
|
||||
&& ( ($regex =~ m/^</ && $regex !~ m/>$/) #handle , in <...>
|
||||
|| ($regex =~ m/@\{/ && $regex !~ m/}$/) #handle , in reading@{...}
|
||||
|| ($regex =~ m/@\{/ && $regex !~ m/\}$/) #handle , in reading@{...}
|
||||
|| ($regex =~ m/^\$.*\(/ && $regex !~ m/\)/) ) #handle , in $<calc>(...)
|
||||
&& defined($list[++$i]) ) {
|
||||
$regex .= ",". $list[$i];
|
||||
@@ -1097,8 +1096,7 @@ readingsGroup_Notify($$)
|
||||
readingsGroup_updateDevices($hash);
|
||||
readingsGroup_inithtml($hash);
|
||||
return undef;
|
||||
}
|
||||
elsif( grep(m/^REREADCFG$/, @{$events}) ) {
|
||||
} elsif( grep(m/^REREADCFG$/, @{$events}) ) {
|
||||
readingsGroup_updateDevices($hash);
|
||||
readingsGroup_inithtml($hash);
|
||||
return undef;
|
||||
@@ -1175,12 +1173,12 @@ readingsGroup_Notify($$)
|
||||
my $regex = @{$device}[1];
|
||||
my @list = (undef);
|
||||
@list = split(",",$regex) if( $regex );
|
||||
#foreach my $regex (@list) {
|
||||
for( my $i = 0; $i <= $#list; ++$i ) {
|
||||
my $regex = $list[$i];
|
||||
while ($regex
|
||||
&& ( ($regex =~ m/^</ && $regex !~ m/>$/) #handle , in <...>
|
||||
|| ($regex =~ m/@\{/ && $regex !~ m/}$/) ) #handle , in reading@{...}
|
||||
|| ($regex =~ m/@\{/ && $regex !~ m/\}$/) #handle , in reading@{...}
|
||||
|| ($regex =~ m/^\$.*\(/ && $regex !~ m/\)/) ) #handle , in $<calc>(...)
|
||||
&& defined($list[++$i]) ) {
|
||||
$regex .= ",". $list[$i];
|
||||
}
|
||||
@@ -1334,6 +1332,7 @@ readingsGroup_Notify($$)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
readingsBeginUpdate($hash) if( $hash->{alwaysTrigger} && $hash->{alwaysTrigger} > 1 );
|
||||
foreach my $trigger (keys %triggers) {
|
||||
@@ -1392,7 +1391,6 @@ readingsGroup_Notify($$)
|
||||
|
||||
}
|
||||
readingsEndUpdate($hash,1) if( $hash->{alwaysTrigger} && $hash->{alwaysTrigger} > 1 );
|
||||
}
|
||||
|
||||
return undef;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user