2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-10 03:06:37 +00:00

HMInfo:minor Bug

git-svn-id: https://svn.fhem.de/fhem/trunk@16971 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
martinp876 2018-07-10 17:49:45 +00:00
parent 5e0f9d576f
commit 25d58d1002

View File

@ -1181,18 +1181,16 @@ sub HMinfo_GetFn($@) {#########################################################
my $c = 0; my $c = 0;
foreach (@pl){ foreach (@pl){
$_ =~ s/\s+$|//g ; $_ =~ s/\s+$|//g ;
$_ =~ s/CMDs_//; $_ =~ s/CMDs[_ ]//;
if ($type ne "long"){ if ($type ne "long"){
$_ =~ s/:*..-.. ..:..:..//g;# if ($type eq "short"); $_ =~ s/:*..-.. ..:..:..//g;# if ($type eq "short");
$plSum[$c] +=$_; $plSum[$c] += $1 if ($_ =~ m/^\s*(\d+)/);
} }
elsif($_ =~m /^[ ,0-9]{1,5}:/){ elsif($_ =~m /^[ ,0-9]{1,5}:/){
my ($cnt,$date) = split(":",$_,2); my ($cnt,$date) = split(":",$_,2);
$_ = sprintf("%-5s-%s",$cnt,$date); $_ = sprintf("%-5s-%s",$cnt,$date);
$plSum[$c] +=$cnt; $plSum[$c] +=$cnt;
} }
$_ =~ s/CMDs // if ($type ne "long");
$c++; $c++;
} }