From 2c63f444c55274797f0c1a8eaeff70c64cceb949 Mon Sep 17 00:00:00 2001 From: rudolfkoenig <> Date: Thu, 22 Oct 2020 19:40:17 +0000 Subject: [PATCH] 98_autocreate.pm: refuse to act on a different type (Forum #115128) git-svn-id: https://svn.fhem.de/fhem/trunk@23006 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/98_autocreate.pm | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/fhem/FHEM/98_autocreate.pm b/fhem/FHEM/98_autocreate.pm index c37d19e0a..e000b930d 100644 --- a/fhem/FHEM/98_autocreate.pm +++ b/fhem/FHEM/98_autocreate.pm @@ -47,7 +47,8 @@ my %flogpar = ( "USBWX_[0-8]" => { GPLOT => "temp4hum6:Temp/Hum,", FILTER => "%NAME" }, "USBWX_ks300" - => { GPLOT => "temp4hum6:Temp/Hum,temp4rain10:Temp/Rain,hum6wind8:Wind/Hum,", + => { GPLOT => + "temp4hum6:Temp/Hum,temp4rain10:Temp/Rain,hum6wind8:Wind/Hum,", FILTER => "%NAME:T:.*" }, # HomeMatic @@ -223,7 +224,13 @@ autocreate_Notify($$) } my ($cmd, $ret); - my $hash = $defs{$name}; # Called from createlog + my $hash = $defs{$name}; # Called (hopefully) from createlog + + if($hash && $hash->{TYPE} ne $type) { + Log 1, "autocreate: refusing to create $type:$name, ". + "as $hash->{TYPE}:$name already exists"; + return; + } #################### if(!$hash) {