34_SWAP.pm: autosave changed ProductCode attribute if autosave ist active
git-svn-id: svn://svn.code.sf.net/p/fhem/code/trunk@7300 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
@@ -989,6 +989,7 @@ SWAP_Parse($$)
|
|||||||
my $first = !defined($rhash->{"SWAP_00-ProductCode"}) || $rhash->{"SWAP_00-ProductCode"} ne $productcode;
|
my $first = !defined($rhash->{"SWAP_00-ProductCode"}) || $rhash->{"SWAP_00-ProductCode"} ne $productcode;
|
||||||
|
|
||||||
SWAP_Attr( "set", $rname, "ProductCode", $productcode ) if( $first );
|
SWAP_Attr( "set", $rname, "ProductCode", $productcode ) if( $first );
|
||||||
|
CommandSave(undef,undef) if( $first && AttrVal( "autocreate", "autosave", 1 ) );
|
||||||
|
|
||||||
if( !defined($products->{$productcode}->{registers}) ){
|
if( !defined($products->{$productcode}->{registers}) ){
|
||||||
SWAP_readDeviceXML( $rhash, $productcode );
|
SWAP_readDeviceXML( $rhash, $productcode );
|
||||||
|
|||||||
Reference in New Issue
Block a user