mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-04 22:19:38 +00:00
HMInfo: minor fix
git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@20889 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
2995de3ac4
commit
340500e7f7
@ -205,9 +205,7 @@ sub HMinfo_Notify(@){##########################################################
|
|||||||
HMinfo_archConfig($hash,$name,"","") if(AttrVal($name,"autoArchive",undef));
|
HMinfo_archConfig($hash,$name,"","") if(AttrVal($name,"autoArchive",undef));
|
||||||
}
|
}
|
||||||
if (grep /INITIALIZED/,@{$events}){
|
if (grep /INITIALIZED/,@{$events}){
|
||||||
HMinfo_SetFn($hash,$name,"loadConfig")
|
HMinfo_SetFn($hash,$name,"loadConfig") if ( substr(AttrVal($name, "autoLoadArchive", 0),0,1) ne 0);
|
||||||
if ( grep (/INITIALIZED/,@{$events})
|
|
||||||
&& (substr(AttrVal($name, "autoLoadArchive", 0),0,1) ne 0));
|
|
||||||
|
|
||||||
}
|
}
|
||||||
return undef;
|
return undef;
|
||||||
@ -1938,7 +1936,7 @@ sub HMinfo_loadConfig($@) {####################################################
|
|||||||
my @entryNF = ();
|
my @entryNF = ();
|
||||||
my %changes;
|
my %changes;
|
||||||
my @rUpdate;
|
my @rUpdate;
|
||||||
my @tmplList = (); #collect templates
|
my @tmplList = (); #collect template definitions
|
||||||
while(<rFile>){
|
while(<rFile>){
|
||||||
chomp;
|
chomp;
|
||||||
my $line = $_;
|
my $line = $_;
|
||||||
@ -1965,12 +1963,14 @@ sub HMinfo_loadConfig($@) {####################################################
|
|||||||
if ($eN eq "templateStart"){#if new block we remove all old templates
|
if ($eN eq "templateStart"){#if new block we remove all old templates
|
||||||
@tmplList = ();
|
@tmplList = ();
|
||||||
}
|
}
|
||||||
push @tmplList,$line;
|
else {
|
||||||
|
push @tmplList,$line;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
elsif($cmd1 eq "templateSet"){
|
elsif($cmd1 eq "templateSet"){
|
||||||
my (undef,$eNt,$tpl,$param) = split("=>",$line);
|
my (undef,$eNt,$tpl,$param) = split("=>",$line);
|
||||||
if (defined($defs{$eNt})){
|
if (defined($defs{$eNt})){
|
||||||
if($tpl eq "start"){
|
if($tpl eq "start"){ # no template defined, or deleted - remove it.
|
||||||
delete $defs{$eNt}{helper}{tmpl};
|
delete $defs{$eNt}{helper}{tmpl};
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
@ -1978,7 +1978,7 @@ sub HMinfo_loadConfig($@) {####################################################
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
elsif($cmd eq "peerBulk"){
|
elsif($cmd eq "peerBulk"){
|
||||||
next if(!$param);
|
next if(!$param);
|
||||||
$param =~ s/ //g;
|
$param =~ s/ //g;
|
||||||
if ($param !~ m/00000000/){
|
if ($param !~ m/00000000/){
|
||||||
@ -1992,7 +1992,7 @@ sub HMinfo_loadConfig($@) {####################################################
|
|||||||
$defs{$eN}{READINGS}{".peerListRDate"}{VAL} = $defs{$eN}{READINGS}{".peerListRDate"}{TIME} = $timeStamp;
|
$defs{$eN}{READINGS}{".peerListRDate"}{VAL} = $defs{$eN}{READINGS}{".peerListRDate"}{TIME} = $timeStamp;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
elsif($cmd eq "regBulk"){
|
elsif($cmd eq "regBulk"){
|
||||||
next if($param !~ m/RegL_0[0-9][:\.]/);#allow . and : for the time to convert to . only
|
next if($param !~ m/RegL_0[0-9][:\.]/);#allow . and : for the time to convert to . only
|
||||||
$param =~ s/\.RegL/RegL/;
|
$param =~ s/\.RegL/RegL/;
|
||||||
$param = ".".$param if (!$defs{$eN}{helper}{expert}{raw});
|
$param = ".".$param if (!$defs{$eN}{helper}{expert}{raw});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user