diff --git a/fhem/FHEM/33_readingsGroup.pm b/fhem/FHEM/33_readingsGroup.pm index b2567ef16..d3ccee852 100644 --- a/fhem/FHEM/33_readingsGroup.pm +++ b/fhem/FHEM/33_readingsGroup.pm @@ -627,9 +627,9 @@ readingsGroup_2html($;$) } } - my $inform_id = ""; - $inform_id = "informId=\"$d-$name.i$item.item\"" if( $readings ); - $ret .= "
$txt
"; + my $informid = ""; + $informid = "informId=\"$d-$name.i$item.item\"" if( $readings ); + $ret .= "
$txt
"; $first = 0; ++$cell_column; next; @@ -678,7 +678,7 @@ readingsGroup_2html($;$) Log3 $name, 3, $name .": ". $regex .": ". $@; last; } - next if( $n !~ m/^$regex$/); + next if( $n !~ m/^$regex$/); } my $val = $h->{$n}; @@ -694,6 +694,7 @@ readingsGroup_2html($;$) $v = FW_htmlEscape($val); } + my $informid = "informId=\"$d-$name.$n\""; my $row_style = lookup2($hash->{helper}{cellStyle},$name,$1,undef,$cell_row,undef); my $cell_style0 = lookup2($hash->{helper}{cellStyle},$name,$1,undef,$cell_row,0); my $cell_style = lookup2($hash->{helper}{cellStyle},$name,$1,undef,$cell_row,$cell_column); @@ -776,6 +777,11 @@ readingsGroup_2html($;$) last if(defined($htmlTxt)); } + if( $htmlTxt =~ m/$name-$set/ ) { + $htmlTxt =~ s/$name-$set/$d-$name.$n/g; + $informid = ""; + } + if( $htmlTxt && $htmlTxt =~ m/(.*)<\/td>/s ) { $v = $1; @@ -783,6 +789,7 @@ readingsGroup_2html($;$) if( defined($mapped) ) { $v =~ s/$set /$mapped /; } + $v =~ s/(.*) // if( !$informid ); $webCmdFn = 1; } elsif( $htmlTxt ) { $v = $htmlTxt; @@ -824,8 +831,8 @@ readingsGroup_2html($;$) } } - $ret .= "$devStateIcon" if( $devStateIcon ); - $ret .= "
$v
" if( !$devStateIcon ); + $ret .= "$devStateIcon" if( $devStateIcon ); + $ret .= "
$v
" if( !$devStateIcon ); $ret .= "
$t
" if( $show_time && $t ); $first = 0; @@ -1053,6 +1060,7 @@ readingsGroup_Notify($$) $cmd = lookup2($hash->{helper}{commands},$n,$reading,$value); if( $cmd && $cmd =~ m/^(\w.*):(\S.*)?$/ ) { + DoTrigger( $name, "$n.$reading: $value" ); next; }