From eed4a4edd1357c9d8df70b58975f41ceb04057d0 Mon Sep 17 00:00:00 2001 From: rudolfkoenig <> Date: Sat, 30 Nov 2024 18:25:51 +0000 Subject: [PATCH] 98_autocreate.pm: update links in the doc, allow creating dummies git-svn-id: https://svn.fhem.de/fhem/trunk@29378 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/98_autocreate.pm | 82 ++++++++++++++++++++++---------------- 1 file changed, 47 insertions(+), 35 deletions(-) diff --git a/fhem/FHEM/98_autocreate.pm b/fhem/FHEM/98_autocreate.pm index 69d7889e8..9f55ce333 100644 --- a/fhem/FHEM/98_autocreate.pm +++ b/fhem/FHEM/98_autocreate.pm @@ -70,8 +70,20 @@ autocreate_Initialize($) $hash->{DefFn} = "autocreate_Define"; $hash->{NotifyFn} = "autocreate_Notify"; $hash->{AttrFn} = "autocreate_Attr"; - $hash->{AttrList}= "autosave filelog device_room weblink weblink_room " . - "disable ignoreTypes autocreateThreshold"; + no warnings 'qw'; + my @attrList = qw( + autocreateThreshold + autosave + device_room + disable + filelog + ignoreTypes + weblink + weblink_room + ); + use warnings 'qw'; + $hash->{AttrList} = join(" ", @attrList); + my %ahash = ( Fn=>"CommandCreateLog", Hlp=>",create log/weblink for ", ModuleName => "autocreate" ); @@ -131,7 +143,7 @@ autocreate_Notify($$) $s =~ s/ -temporary//; } - if($s =~ m/^UNDEFINED ([^ ]*) ([^ ]*) (.*)$/) { + if($s =~ m/^UNDEFINED ([^ ]*) ([^ ]*)(.*)$/) { my ($name, $type, $arg) = ($1, $2, $3); next if(AttrVal($me, "disable", undef)); @@ -210,11 +222,11 @@ autocreate_Notify($$) my $count = keys %{$hash->{received}{$type}{$arg}}; Log3 $me, 4, "autocreate: received $count event(s) for ". - "'$type $arg' during the last $interval seconds"; + "'$type$arg' during the last $interval seconds"; if( $count < $min_count ) { Log3 $me, 4, "autocreate: ignoring event for ". - "'$type $arg': at least $min_count needed"; + "'$type$arg': at least $min_count needed"; next; } } @@ -236,8 +248,8 @@ autocreate_Notify($$) #################### if(!$hash) { - $cmd = "$name $type $arg"; - $cmd = "-temporary $name $type $arg" if($temporary); + $cmd = "$name $type$arg"; + $cmd = "-temporary $name $type$arg" if($temporary); Log3 $me, 2, "autocreate: define $cmd"; $ret = CommandDefine(undef, $cmd); if($ret) { @@ -729,7 +741,7 @@ autocreate_Attr(@) =item summary_DE Erzeugt FHEM-Geräte automatisch =begin html - +

autocreate