diff --git a/fhem/FHEM/34_SWAP.pm b/fhem/FHEM/34_SWAP.pm index 4a5855006..771ed81b0 100755 --- a/fhem/FHEM/34_SWAP.pm +++ b/fhem/FHEM/34_SWAP.pm @@ -989,6 +989,7 @@ SWAP_Parse($$) my $first = !defined($rhash->{"SWAP_00-ProductCode"}) || $rhash->{"SWAP_00-ProductCode"} ne $productcode; SWAP_Attr( "set", $rname, "ProductCode", $productcode ) if( $first ); + CommandSave(undef,undef) if( $first && AttrVal( "autocreate", "autosave", 1 ) ); if( !defined($products->{$productcode}->{registers}) ){ SWAP_readDeviceXML( $rhash, $productcode );