structure: fixing delstruct/addstruct for save

git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@4690 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2014-01-19 16:28:17 +00:00
parent fbb6a6fe59
commit eafaf9e836

View File

@ -284,6 +284,7 @@ CommandAddStruct($)
foreach my $d (devspec2array($a[0])) {
$hash->{CONTENT}{$d} = 1;
}
$hash->{DEF} = $hash->{ATTR} . " " . join(" ",sort keys %{$hash->{CONTENT}});
@a = ( "set", $hash->{NAME}, $hash->{ATTR}, $hash->{NAME} );
structure_Attr(@a);
@ -310,6 +311,7 @@ CommandDelStruct($)
foreach my $d (devspec2array($a[0])) {
delete($hash->{CONTENT}{$d});
}
$hash->{DEF} = $hash->{ATTR} . " " . join(" ",sort keys %{$hash->{CONTENT}});
@a = ( "del", $hash->{NAME}, $hash->{ATTR} );
structure_Attr(@a);