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

98_copy.pm: copy userattr first so that userattrs can be copied also.

git-svn-id: https://svn.fhem.de/fhem/trunk@7733 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
justme-1968 2015-01-26 14:30:11 +00:00
parent 3137167c09
commit 6116ed536e

View File

@ -32,7 +32,13 @@ CommandCopy($$)
my $ret = CommandDefine($hash, $cmd );
return $ret if( $ret );
my $a = 'userattr';
if( $attr{$args[0]} && $attr{$args[0]}{$a} ) {
CommandAttr($hash, "$args[1] $a $attr{$args[0]}{$a}");
}
foreach my $a (keys %{$attr{$args[0]}}) {
next if( $a eq 'userattr' );
CommandAttr($hash, "$args[1] $a $attr{$args[0]}{$a}");
}
}