From d2fb68774a96b5b67c1fcf5c4f771a395dfcbab7 Mon Sep 17 00:00:00 2001 From: justme-1968 Date: Thu, 15 May 2014 17:02:04 +0000 Subject: [PATCH] sort devices if sortDevices attribute is changed git-svn-id: https://svn.fhem.de/fhem/trunk@5868 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/33_readingsGroup.pm | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/fhem/FHEM/33_readingsGroup.pm b/fhem/FHEM/33_readingsGroup.pm index c77a5bc08..a1f72a382 100644 --- a/fhem/FHEM/33_readingsGroup.pm +++ b/fhem/FHEM/33_readingsGroup.pm @@ -890,6 +890,16 @@ readingsGroup_Attr($$$) } else { delete $hash->{alwaysTrigger}; } + } elsif( $attrName eq "sortDevices" ) { + if( $cmd eq "set" ) { + $attrVal = 1 if($attrVal); + $attr{$name}{$attrName} = $attrVal; + } else { + delete $attr{$name}{$attrName}; + } + + my $hash = $defs{$name}; + readingsGroup_updateDevices($hash); } if( $cmd eq "set" ) {