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

fhem.pl: fix TimeSeries issue (git bugzilla #8)

git-svn-id: https://svn.fhem.de/fhem/trunk@8320 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2015-03-29 10:49:31 +00:00
parent 6357805578
commit d38398923b

View File

@ -3768,9 +3768,10 @@ readingsBulkUpdate($$$@)
#Debug "TimeSeries created."; #Debug "TimeSeries created.";
} }
my $now = $hash->{".updateTime"}; my $now = $hash->{".updateTime"};
$changed= $ts->elapsed($now); my $val = $value; # save value
$value= $ts->{$function} if($changed); $changed = $ts->elapsed($now);
$ts->add($now, $value); $value = $ts->{$function} if($changed);
$ts->add($now, $val);
} else { } else {
# If no event-aggregator attribute, then remove stale series if any. # If no event-aggregator attribute, then remove stale series if any.
delete $readings->{".ts"}; delete $readings->{".ts"};