2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-20 01:06:04 +00:00

33_readingsGroup.pm: fixed default back to .* if no regex is given for a device (forum: https://forum.fhem.de/index.php/topic,14425.msg519229.html#msg519229)

git-svn-id: https://svn.fhem.de/fhem/trunk@12553 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
justme-1968 2016-11-12 19:22:37 +00:00
parent 23bcb8591c
commit dd7259b2b9

View File

@ -156,7 +156,8 @@ readingsGroup_updateDevices($;$)
foreach my $device (@devices) {
my $regex = $device->[1];
my @list = split(",",$regex) if( $regex );
my @list = ('.*');
@list = split(",",$regex) if( $regex );
my $first = 1;
my $multi = @list;
for( my $i = 0; $i <= $#list; ++$i ) {
@ -237,6 +238,7 @@ sub readingsGroup_Define($$)
if( $init_done ) {
readingsGroup_updateDevices($hash);
$hash->{fhem}->{lastDefChange} = $lastDefChange+1;
readingsGroup_inithtml($hash);
}
@ -752,7 +754,8 @@ readingsGroup_2html($;$)
delete $hash->{groupedList};
my @list = split(",",$regex) if( $regex );
my @list = ('.*');
@list = split(",",$regex) if( $regex );
if( @list && $list[0] =~ m/^@(.*)/ ) {
my $index = $1;
my $regex = $list[$index];
@ -1226,7 +1229,8 @@ readingsGroup_Notify($$)
next if( $dev->{NAME} ne $h->{NAME} );
my $n = $h->{NAME};
my $regex = @{$device}[1];
my @list = split(",",$regex) if( $regex );
my @list = ('.*');
@list = split(",",$regex) if( $regex );
if( $hash->{groupedList} ) {
@list = @{$hash->{groupedList}};