From a3cbbb451334700c863219e700bcc039e17551bd Mon Sep 17 00:00:00 2001 From: martinp876 <> Date: Sun, 11 Aug 2019 13:48:33 +0000 Subject: [PATCH] 10_CUL_HM: remove warning at startup for AttrVal git-svn-id: https://svn.fhem.de/fhem/trunk@19983 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/10_CUL_HM.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fhem/FHEM/10_CUL_HM.pm b/fhem/FHEM/10_CUL_HM.pm index e86fdd4b5..9b2cab0f2 100755 --- a/fhem/FHEM/10_CUL_HM.pm +++ b/fhem/FHEM/10_CUL_HM.pm @@ -694,7 +694,6 @@ sub CUL_HM_Attr(@) {################################# return $chk if ($chk); my $updtReq = 0; - if ($attrName eq "expert"){#[0,1,2] $attr{$name}{$attrName} = $attrVal; CUL_HM_chgExpLvl($_) foreach ((map{CUL_HM_id2Hash($_)} CUL_HM_getAssChnIds($name)),$defs{$name}); @@ -713,6 +712,7 @@ sub CUL_HM_Attr(@) {################################# else{ return "attribut not allowed for channels" if (!$hash->{helper}{role}{dev}); + return if (!$init_done); # will do at updateConfig CUL_HM_ActAdd(CUL_HM_name2Id($name),$attrVal); } } @@ -9162,7 +9162,8 @@ sub CUL_HM_dimLog($) {# dimmer readings - support virtual chan - unused so far # that period. # ActionDetector will use the fixed HMid 000000 sub CUL_HM_ActGetCreateHash() {# get ActionDetector - create if necessary - if (!$modules{CUL_HM}{defptr}{"000000"} && $init_done){ + return if (!$init_done); + if (!$modules{CUL_HM}{defptr}{"000000"}){ CommandDefine(undef,"ActionDetector CUL_HM 000000"); $attr{ActionDetector}{actCycle} = 600; $attr{ActionDetector}{"event-on-change-reading"} = ".*"; @@ -9196,7 +9197,6 @@ sub CUL_HM_ActAdd($$) {# add an HMid to list for activity supervision my ($cycleString,undef)=CUL_HM_time2sec($timeout); my $devName = CUL_HM_id2Name($devId); my $devHash = $defs{$devName}; - $attr{$devName}{actCycle} = $cycleString; $attr{$devName}{actStatus}=""; # force trigger my $actHash = CUL_HM_ActGetCreateHash();