2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-15 16:19:11 +00:00

33_readingsGroup.pm: use original reading value for all lookups

git-svn-id: https://svn.fhem.de/fhem/trunk@8776 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
justme-1968 2015-06-19 11:39:24 +00:00
parent 03a451a11f
commit 64b610fef9

View File

@ -533,7 +533,7 @@ readingsGroup_value2html($$$$$$$$$)
my $cmd;
my $devStateIcon;
if( my $value_icon = $hash->{helper}{valueIcon} ) {
if( my $icon = lookup($value_icon,$name,$alias,$n,$v,$room,$group,$cell_row,"") ) {
if( my $icon = lookup($value_icon,$name,$alias,$n,$value_orig,$room,$group,$cell_row,"") ) {
if( $icon =~ m/^[\%\$]devStateIcon$/ ) {
my %extPage = ();
my ($allSets, $cmdlist, $txt) = FW_devState($name, $room, \%extPage);
@ -541,14 +541,14 @@ readingsGroup_value2html($$$$$$$$$)
} else {
$devStateIcon = FW_makeImage( $icon, $v, "icon" );
$cmd = lookup2($hash->{helper}{commands},$name,$n,$icon);
$cmd = lookup2($hash->{helper}{commands},$name,$n,$v) if( !$cmd );
$cmd = lookup2($hash->{helper}{commands},$name,$n,$value_orig) if( !$cmd );
}
}
}
my $webCmdFn = 0;
if( !$devStateIcon ) {
$cmd = lookup2($hash->{helper}{commands},$name,$n,$v);
$cmd = lookup2($hash->{helper}{commands},$name,$n,$value_orig);
if( $cmd && $cmd =~ m/^([\w\/.-]*):(\S*)?(\s\S*)?$/ ) {
my $set = $1;
@ -599,14 +599,14 @@ readingsGroup_value2html($$$$$$$$$)
($v,$devStateIcon) = readingsGroup_makeLink($v,$devStateIcon,$cmd) if( !$webCmdFn );
if( my $value_prefix = $hash->{helper}{valuePrefix} ) {
if( my $value_prefix = lookup2($value_prefix,$name,$n,$v) ) {
if( my $value_prefix = lookup2($value_prefix,$name,$n,$value_orig) ) {
$v = $value_prefix . $v;
$devStateIcon = $value_prefix . $devStateIcon if( $devStateIcon );
}
}
if( my $value_suffix = $hash->{helper}{valueSuffix} ) {
if( my $value_suffix = lookup2($value_suffix,$name,$n,$value_formated) ) {
if( my $value_suffix = lookup2($value_suffix,$name,$n,$value_orig) ) {
$v .= $value_suffix;
$devStateIcon .= $value_suffix if( $devStateIcon );
}
@ -618,7 +618,7 @@ readingsGroup_value2html($$$$$$$$$)
$hash->{helper}{values}{formated}[$cell_column][$cell_row] = $value_formated;
$hash->{helper}{values}{prefixsuffix}[$cell_column][$cell_row] = $value_prefix_suffix;
my $value_style = lookup2($hash->{helper}{valueStyle},$name,$n,$v,$cell_row,$cell_column);
my $value_style = lookup2($hash->{helper}{valueStyle},$name,$n,$value_orig,$cell_row,$cell_column);
$v = "<div $value_style>$v</div>" if( $value_style && !$devStateIcon );
return($informid,$v,$devStateIcon)