diff --git a/fhem/CHANGED b/fhem/CHANGED
index 086557eab..fac649546 100644
--- a/fhem/CHANGED
+++ b/fhem/CHANGED
@@ -1,6 +1,7 @@
# 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.
- SVN
+ - feature: readingsGroup: added sortDevices attribute
- feature: ENIGMA2: new reading 'recordings', new command record
- change: ENIGMA2: rewrite for NonBlocking
- feature: SYSMOM: new Plot + Doc
diff --git a/fhem/FHEM/33_readingsGroup.pm b/fhem/FHEM/33_readingsGroup.pm
index a84e23a9b..64ce97df9 100644
--- a/fhem/FHEM/33_readingsGroup.pm
+++ b/fhem/FHEM/33_readingsGroup.pm
@@ -40,7 +40,7 @@ sub readingsGroup_Initialize($)
#$hash->{SetFn} = "readingsGroup_Set";
$hash->{GetFn} = "readingsGroup_Get";
$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_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->{DEVICES} = \@devices;
@@ -974,6 +980,8 @@ readingsGroup_Attr($$$)
1 -> disable notify processing and longpoll updates. Notice: this also disables rename and delete handling.
2 -> also disable html table creation
3 -> also disable html creation completely
+