mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-16 10:46:03 +00:00
fhem.pl: finetuning of attr grouping (Forum #119289)
git-svn-id: https://svn.fhem.de/fhem/trunk@23903 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
5b854a4b9e
commit
6c2dd3050b
@ -1441,7 +1441,11 @@ FW_detailSelect(@)
|
||||
{
|
||||
my ($d, $cmd, $list, $param, $typeHash) = @_;
|
||||
return "" if(!$list || $FW_hiddenroom{input});
|
||||
my @al = map { s/:.*//; $_ } split(" ", $list);
|
||||
my @al = sort {
|
||||
my $ta = $typeHash->{$a} ? $typeHash->{$a}.$a : $a;
|
||||
my $tb = $typeHash->{$b} ? $typeHash->{$b}.$b : $b;
|
||||
$ta cmp $tb;
|
||||
} map { s/:.*//; $_ } split(" ", $list);
|
||||
|
||||
my $selEl = (defined($al[0]) ? $al[0] : " ");
|
||||
$selEl = $1 if($list =~ m/([^ ]*):slider,/); # promote a slider if available
|
||||
|
16
fhem/fhem.pl
16
fhem/fhem.pl
@ -281,8 +281,8 @@ $selectTimestamp = gettimeofday();
|
||||
$cvsid = '$Id$';
|
||||
|
||||
my $AttrList = "alias comment:textField-long eventMap:textField-long ".
|
||||
"group room suppressReading userReadings:textField-long ".
|
||||
"verbose:0,1,2,3,4,5 userattr";
|
||||
"group room suppressReading userattr ".
|
||||
"userReadings:textField-long verbose:0,1,2,3,4,5 ";
|
||||
|
||||
my $currcfgfile=""; # current config/include file
|
||||
my $currlogfile; # logfile, without wildcards
|
||||
@ -388,6 +388,12 @@ my @attrList = qw(
|
||||
timestamp-on-change-reading
|
||||
);
|
||||
$readingFnAttributes = join(" ", @attrList);
|
||||
my %framework_attrList = map { $_ => 1 } @attrList;
|
||||
map { $framework_attrList{$_} = 1 } (
|
||||
"ignore",
|
||||
"disable",
|
||||
"disabledForIntervals"
|
||||
);
|
||||
|
||||
my %ra = (
|
||||
"suppressReading" => { s=>"\n" },
|
||||
@ -2747,7 +2753,9 @@ getAllAttr($;$$)
|
||||
return if(!defined($v));
|
||||
$list .= " " if($list);
|
||||
$list .= $v;
|
||||
map { s/:.*//; $typeHash->{$_} = $type } split(" ",$v) if($typeHash);
|
||||
map { s/:.*//;
|
||||
$typeHash->{$_} = $framework_attrList{$_} ? "framework" : $type }
|
||||
split(" ",$v) if($typeHash);
|
||||
};
|
||||
|
||||
&$add($AttrList, "global");
|
||||
@ -2764,7 +2772,7 @@ getAllAttr($;$$)
|
||||
$v =~ s/\n/ /g;
|
||||
&$add($v, $type);
|
||||
};
|
||||
$nl2space->($attr{global}{userattr}, "Global userattr");
|
||||
$nl2space->($attr{global}{userattr}, "global userattr");
|
||||
$nl2space->($attr{$d}{userattr}, "Device userattr") if($attr{$d});
|
||||
return $list;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user