2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 06:39:11 +00:00

98_HMimfo:minor improvement for init at startup

git-svn-id: https://svn.fhem.de/fhem/trunk@25079 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
martinp876 2021-10-16 10:33:02 +00:00
parent 04c81c51b3
commit 8a605a2a86

View File

@ -263,13 +263,19 @@ sub HMinfo_Notify(@){##########################################################
}
return undef;
}
sub HMinfo_init($){#############################################################
my ($hash, $dev) = @_;
sub HMinfo_init($){############################################################
#my ($hash, $dev) = @_;
RemoveInternalTimer("HMinfo_init");# just to be sure...
if ($init_done){
Log3($hash,5,"debug: HMinfo_init");
if (!$modules{HMinfo}{helper}{initDone}){
my ($hm) = devspec2array("TYPE=HMinfo");
Log3($hm,5,"debug: HMinfo_init");
foreach my $attrName (keys %{$attr{$hm}}){
#Log 1," update HM attributes - will update CUL_HM settings ocationally";
HMinfo_Attr("set",$hm, $attrName,$attr{$hm}{$attrName});
}
if (substr(AttrVal($hm, "autoLoadArchive", 0),0,1) ne 0){
HMinfo_SetFn($defs{$hm},$hm,"loadConfig");
InternalTimer(gettimeofday()+5,"HMinfo_init", "HMinfo_init", 0);
@ -1251,7 +1257,7 @@ sub HMinfo_getCfgDefere($){####################################################
HMinfo_GetFn($defs{$hm},$hm,"configCheck","-f","^(".'\^('.join("|",@{$defs{$hm}{helper}{nbPend}}).')\$'.")\$");
}
sub HMinfo_startBlocking(@){####################################################
sub HMinfo_startBlocking(@){###################################################
my ($name,$fkt,$param) = @_;
my $hash = $defs{$name};
Log3 $hash,5,"HMinfo $name start blocking:$fkt";