mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-19 12:46:03 +00:00
34_SWAP.pm: use CommandAttr instead of SWAP_Attr
git-svn-id: https://svn.fhem.de/fhem/trunk@7303 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
2f4ea03fb3
commit
ae5b3713e1
@ -988,7 +988,7 @@ SWAP_Parse($$)
|
|||||||
my $productcode = $data;
|
my $productcode = $data;
|
||||||
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 );
|
CommandAttr(undef, "$rname ProductCode $productcode") if( $first );
|
||||||
CommandSave(undef,undef) if( $first && AttrVal( "autocreate", "autosave", 1 ) );
|
CommandSave(undef,undef) if( $first && AttrVal( "autocreate", "autosave", 1 ) );
|
||||||
|
|
||||||
if( !defined($products->{$productcode}->{registers}) ){
|
if( !defined($products->{$productcode}->{registers}) ){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user