mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-15 22:26:04 +00:00
allow webCmdFn mapping of webCmd label
git-svn-id: https://svn.fhem.de/fhem/trunk@5067 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
17d6fc13bd
commit
2b449d5f9a
@ -187,6 +187,8 @@ lookup($$$$$$$$)
|
||||
$default = $mapping;
|
||||
}
|
||||
|
||||
return $default if( !defined($default) );
|
||||
|
||||
$default =~ s/\%ALIAS/$alias/g;
|
||||
$default =~ s/\%DEVICE/$name/g;
|
||||
$default =~ s/\%READING/$reading/g;
|
||||
@ -453,10 +455,18 @@ readingsGroup_2html($)
|
||||
}
|
||||
|
||||
if( $htmlTxt =~ m/<td colspan='2'>(.*)<\/td>/s ) {
|
||||
$txt = $1;
|
||||
$txt = $1;
|
||||
|
||||
my $a = AttrVal($name, "alias", $name);
|
||||
my $room = AttrVal($name, "room", "");
|
||||
my $group = AttrVal($name, "group", "");
|
||||
my $mapped = lookup($mapping,$name,$a,$set,"",$room,$group,undef);
|
||||
if( defined($mapped) ) {
|
||||
$txt =~ s/$set /$mapped /;
|
||||
}
|
||||
} elsif( $htmlTxt ) {
|
||||
$txt = $htmlTxt;
|
||||
}
|
||||
$txt = $htmlTxt;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -568,12 +578,16 @@ readingsGroup_2html($)
|
||||
}
|
||||
|
||||
if( $htmlTxt =~ m/<td colspan='2'>(.*)<\/td>/s ) {
|
||||
$v = $1;
|
||||
$v = $1;
|
||||
my $mapped = lookup($mapping,$name,$a,$set,"",$room,$group,undef);
|
||||
if( defined($mapped) ) {
|
||||
$v =~ s/$set /$mapped /;
|
||||
}
|
||||
$webCmdFn = 1;
|
||||
} elsif( $htmlTxt ) {
|
||||
$v = $htmlTxt;
|
||||
$v = $htmlTxt;
|
||||
$webCmdFn = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
($v,$devStateIcon) = readingsGroup_makeLink($v,$devStateIcon,$cmd) if( !$webCmdFn );
|
||||
|
Loading…
x
Reference in New Issue
Block a user