2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-13 17:26:34 +00:00

eventMap / multiroom fixes

git-svn-id: https://svn.fhem.de/fhem/trunk@1402 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2012-03-31 11:20:42 +00:00
parent f2a5eb576c
commit 90788c72ca
2 changed files with 11 additions and 2 deletions

View File

@ -1841,6 +1841,7 @@ CommandSetstate($$)
if($a[1] =~ m/^(\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}) +([^ ].*)$/) {
my ($tim, $nameval) = ($1, $2);
my ($sname, $sval) = split(" ", $nameval, 2);
(undef, $sval) = ReplaceEventMap($d, [$d, $sval], 0) if($attr{$d}{eventMap});
my $ret = CallFn($sdev, "StateFn", $d, $tim, $sname, $sval);
if($ret) {
push @rets, $ret;

View File

@ -1939,7 +1939,8 @@ FW_Notify($$)
my $dn = $dev->{NAME};
my $data;
if($filter eq "all" || AttrVal($dn, "room", "") eq $filter) {
my $rn = AttrVal($dn, "room", "");
if($filter eq "all" || $rn =~ m/\b$filter\b/) {
FW_ReadIcons();
my @old = ($FW_wname, $FW_ME, $FW_longpoll, $FW_ss, $FW_tp, $FW_subdir);
@ -2050,7 +2051,14 @@ FW_devState($$)
if($link) {
my $room = AttrVal($d, "room", undef);
$link .= "&room=$room" if($room);
if($room) {
if($FW_room && $room =~ m/\b$FW_room\b/) {
$room = $FW_room;
} else {
$room =~ s/,.*//;
}
$link .= "&room=$room";
}
if($FW_longpoll) {
$txt = "<a onClick=\"cmd('$FW_ME$FW_subdir?XHR=1&$link')\">$txt</a>";