diff --git a/fhem/CHANGED b/fhem/CHANGED index 32673c894..40ee7ee3b 100644 --- a/fhem/CHANGED +++ b/fhem/CHANGED @@ -1,5 +1,6 @@ # Add changes at the top of the list. Keep it in ASCII, and 80-char wide. # Do not insert empty lines here, update check depends on it. + - bugfix: fixed handling of autocreation for 10_OWServer.pm - feature: option to cope with partial messages in ECMD/ECMDDevice - bugfix: SOMFY: add module to CUL client list, to set IODev automatically - feature: sequence: triggerPartial Attribute added diff --git a/fhem/FHEM/10_OWServer.pm b/fhem/FHEM/10_OWServer.pm index 0ef2f9848..26ba9f658 100644 --- a/fhem/FHEM/10_OWServer.pm +++ b/fhem/FHEM/10_OWServer.pm @@ -369,11 +369,14 @@ OWServer_Autocreate($) my ($hash)= @_; my $name = $hash->{NAME}; + my $acdname= ""; foreach my $d (keys %defs) { next if($defs{$d}{TYPE} ne "autocreate"); - return undef if(AttrVal($defs{$d}{NAME},"disable",undef)); + $acdname= $defs{$d}{NAME}; + return undef if(AttrVal($acdname,"disable",undef)); } - + return undef unless($acdname ne ""); + my $owserver= $hash->{fhem}{owserver}; my @dir= split(",", $owserver->dir("/")); @@ -423,7 +426,7 @@ OWServer_Autocreate($) } } - CommandSave(undef,undef) if( $created && AttrVal( "autocreate", "autosave", 1 ) ); + CommandSave(undef,undef) if( $created && AttrVal($acdname, "autosave", 1 ) ); return undef; }