structure: fixing delstruct/addstruct for save
git-svn-id: svn://svn.code.sf.net/p/fhem/code/trunk@4690 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
@@ -284,6 +284,7 @@ CommandAddStruct($)
|
|||||||
foreach my $d (devspec2array($a[0])) {
|
foreach my $d (devspec2array($a[0])) {
|
||||||
$hash->{CONTENT}{$d} = 1;
|
$hash->{CONTENT}{$d} = 1;
|
||||||
}
|
}
|
||||||
|
$hash->{DEF} = $hash->{ATTR} . " " . join(" ",sort keys %{$hash->{CONTENT}});
|
||||||
|
|
||||||
@a = ( "set", $hash->{NAME}, $hash->{ATTR}, $hash->{NAME} );
|
@a = ( "set", $hash->{NAME}, $hash->{ATTR}, $hash->{NAME} );
|
||||||
structure_Attr(@a);
|
structure_Attr(@a);
|
||||||
@@ -310,6 +311,7 @@ CommandDelStruct($)
|
|||||||
foreach my $d (devspec2array($a[0])) {
|
foreach my $d (devspec2array($a[0])) {
|
||||||
delete($hash->{CONTENT}{$d});
|
delete($hash->{CONTENT}{$d});
|
||||||
}
|
}
|
||||||
|
$hash->{DEF} = $hash->{ATTR} . " " . join(" ",sort keys %{$hash->{CONTENT}});
|
||||||
|
|
||||||
@a = ( "del", $hash->{NAME}, $hash->{ATTR} );
|
@a = ( "del", $hash->{NAME}, $hash->{ATTR} );
|
||||||
structure_Attr(@a);
|
structure_Attr(@a);
|
||||||
|
|||||||
Reference in New Issue
Block a user