2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-03 16:56:54 +00:00

sort devices if sortDevices attribute is changed

git-svn-id: https://svn.fhem.de/fhem/trunk@5868 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
justme-1968 2014-05-15 17:02:04 +00:00
parent 223409b3cb
commit d2fb68774a

View File

@ -890,6 +890,16 @@ readingsGroup_Attr($$$)
} else { } else {
delete $hash->{alwaysTrigger}; 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" ) { if( $cmd eq "set" ) {