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

98_DOIFtools.pm: fixed Error: >name< has no TYPE, but following keys: >< which occurs during a statistics report generation if devices are deleted during event recording before.

git-svn-id: https://svn.fhem.de/fhem/trunk@13203 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
Ellert 2017-01-23 11:15:47 +00:00
parent 1b91c453a9
commit 04d4c3589e
2 changed files with 5 additions and 2 deletions

View File

@ -1,5 +1,8 @@
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide. # Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
# Do not insert empty lines here, update check depends on it. # Do not insert empty lines here, update check depends on it.
- bugfix: 98_DOIFtools.pm: fixed Error: >name< has no TYPE, but following
keys: >< which occurs during a statistics report generation if
devices are deleted during event recording before
- bugfix: HMCCUConf.pm: changed default value of ccudef-readingfilter - bugfix: HMCCUConf.pm: changed default value of ccudef-readingfilter
- update: 10_IT: send EV1527 command for switch, change some log level - update: 10_IT: send EV1527 command for switch, change some log level
- change: 98_powerMap: default value for reading pM_power was renamed to - change: 98_powerMap: default value for reading pM_power was renamed to

View File

@ -875,8 +875,8 @@ sub DOIFtools_Get($@)
$typsum = 0; $typsum = 0;
$t=0; $t=0;
foreach my $key (sort keys %{$defs{$pn}->{READINGS}}) { foreach my $key (sort keys %{$defs{$pn}->{READINGS}}) {
$rate = ($te ? int($hash->{READINGS}{$key}{VAL}/$te + 0.5) : 0) if ($key =~ m/^$rx($regex)/ and $defs{$1}->{TYPE} eq $typ); $rate = ($te ? int($hash->{READINGS}{$key}{VAL}/$te + 0.5) : 0) if ($key =~ m/^$rx($regex)/ and defined($defs{$1}) and $defs{$1}->{TYPE} eq $typ);
if ($key =~ m/^$rx($regex)/ and $defs{$1}->{TYPE} eq $typ and $rate >= ReadingsNum($pn,"statisticsShowRate_ge",0)) { if ($key =~ m/^$rx($regex)/ and defined($defs{$1}) and $defs{$1}->{TYPE} eq $typ and $rate >= ReadingsNum($pn,"statisticsShowRate_ge",0)) {
$evtsum += $hash->{READINGS}{$key}{VAL}; $evtsum += $hash->{READINGS}{$key}{VAL};
$typsum += $hash->{READINGS}{$key}{VAL}; $typsum += $hash->{READINGS}{$key}{VAL};
$allattr = " ".join(" ",keys %{$attr{$1}}); $allattr = " ".join(" ",keys %{$attr{$1}});