From 503365c6661bb65d655cb16174ac1550821ea2bc Mon Sep 17 00:00:00 2001 From: rudolfkoenig Date: Wed, 14 Dec 2011 07:58:30 +0000 Subject: [PATCH] using AttrVal instead of $attr git-svn-id: https://fhem.svn.sourceforge.net/svnroot/fhem/trunk/fhem@1131 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- FHEM/98_autocreate.pm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/FHEM/98_autocreate.pm b/FHEM/98_autocreate.pm index a3817117c..faf044f76 100644 --- a/FHEM/98_autocreate.pm +++ b/FHEM/98_autocreate.pm @@ -153,7 +153,7 @@ autocreate_Notify($$) } $hash = $defs{$name}; $nrcreated++; - my $room = replace_wildcards($hash, $attr{$me}{device_room}); + my $room = replace_wildcards($hash, AttrVal($me, "device_room", "%TYPE")); $attr{$name}{room} = $room if($room); # BlackList processing @@ -164,7 +164,7 @@ autocreate_Notify($$) last if($blfound); #################### - my $fl = replace_wildcards($hash, $attr{$me}{filelog}); + my $fl = replace_wildcards($hash, AttrVal($me, "filelog", "")); next if(!$fl); my $flname = "FileLog_$name"; delete($defs{$flname}); # If we are re-creating it with createlog. @@ -186,8 +186,8 @@ autocreate_Notify($$) #################### - next if(!$attr{$me}{weblink} || !$gplot); - $room = replace_wildcards($hash, $attr{$me}{weblink_room}); + next if(!AttrVal($me, "weblink", 1) || !$gplot); + $room = replace_wildcards($hash, AttrVal($me, "weblink_room", "Plots")); my $wnr = 1; foreach my $wdef (split(/,/, $gplot)) { next if(!$wdef); @@ -243,7 +243,7 @@ autocreate_Notify($$) } - CommandSave(undef, undef) if(!$ret && $nrcreated && $attr{$me}{autosave}); + CommandSave(undef, undef) if(!$ret && $nrcreated && AttrVal($me,"autosave",1)); return $ret; }