mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-21 07:56:03 +00:00
added sortDevices attribute
git-svn-id: https://svn.fhem.de/fhem/trunk@5053 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
e29d8f1be3
commit
a9404010f3
@ -1,6 +1,7 @@
|
|||||||
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
|
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
|
||||||
# Do not insert empty lines here, update check depends on it.
|
# Do not insert empty lines here, update check depends on it.
|
||||||
- SVN
|
- SVN
|
||||||
|
- feature: readingsGroup: added sortDevices attribute
|
||||||
- feature: ENIGMA2: new reading 'recordings', new command record
|
- feature: ENIGMA2: new reading 'recordings', new command record
|
||||||
- change: ENIGMA2: rewrite for NonBlocking
|
- change: ENIGMA2: rewrite for NonBlocking
|
||||||
- feature: SYSMOM: new Plot + Doc
|
- feature: SYSMOM: new Plot + Doc
|
||||||
|
@ -40,7 +40,7 @@ sub readingsGroup_Initialize($)
|
|||||||
#$hash->{SetFn} = "readingsGroup_Set";
|
#$hash->{SetFn} = "readingsGroup_Set";
|
||||||
$hash->{GetFn} = "readingsGroup_Get";
|
$hash->{GetFn} = "readingsGroup_Get";
|
||||||
$hash->{AttrFn} = "readingsGroup_Attr";
|
$hash->{AttrFn} = "readingsGroup_Attr";
|
||||||
$hash->{AttrList} = "disable:1,2,3 nameIcon valueIcon mapping separator style nameStyle valueColumns valueStyle valueFormat commands timestampStyle noheading:1 nolinks:1 notime:1 nostate:1 alwaysTrigger:1";
|
$hash->{AttrList} = "disable:1,2,3 nameIcon valueIcon mapping separator style nameStyle valueColumns valueStyle valueFormat commands timestampStyle noheading:1 nolinks:1 notime:1 nostate:1 alwaysTrigger:1 sortDevices:1";
|
||||||
|
|
||||||
$hash->{FW_detailFn} = "readingsGroup_detailFn";
|
$hash->{FW_detailFn} = "readingsGroup_detailFn";
|
||||||
$hash->{FW_summaryFn} = "readingsGroup_detailFn";
|
$hash->{FW_summaryFn} = "readingsGroup_detailFn";
|
||||||
@ -129,6 +129,12 @@ readingsGroup_updateDevices($)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if( AttrVal( $hash->{NAME}, "sortDevices", 0 ) == 1 ) {
|
||||||
|
@devices = sort { my $aa = @{$a}[0]; my $bb = @{$b}[0];
|
||||||
|
lc(AttrVal($aa,"sortby",AttrVal($aa,"alias",$aa))) cmp
|
||||||
|
lc(AttrVal($bb,"sortby",AttrVal($bb,"alias",$bb))) } @devices;
|
||||||
|
}
|
||||||
|
|
||||||
$hash->{CONTENT} = \%list;
|
$hash->{CONTENT} = \%list;
|
||||||
$hash->{DEVICES} = \@devices;
|
$hash->{DEVICES} = \@devices;
|
||||||
|
|
||||||
@ -974,6 +980,8 @@ readingsGroup_Attr($$$)
|
|||||||
1 -> disable notify processing and longpoll updates. Notice: this also disables rename and delete handling.<br>
|
1 -> disable notify processing and longpoll updates. Notice: this also disables rename and delete handling.<br>
|
||||||
2 -> also disable html table creation<br>
|
2 -> also disable html table creation<br>
|
||||||
3 -> also disable html creation completely</li>
|
3 -> also disable html creation completely</li>
|
||||||
|
<li>sortDevices<br>
|
||||||
|
1 -> sort the device lines alphabetically. use the first of sortby or alias or name that is defined for each device.</li>
|
||||||
<li>noheading<br>
|
<li>noheading<br>
|
||||||
If set to 1 the readings table will have no heading.</li>
|
If set to 1 the readings table will have no heading.</li>
|
||||||
<li>nolinks<br>
|
<li>nolinks<br>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user