fhem.pl: fix TimeSeries issue (git bugzilla #8)
git-svn-id: svn://svn.code.sf.net/p/fhem/code/trunk@8320 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
@@ -3768,9 +3768,10 @@ readingsBulkUpdate($$$@)
|
||||
#Debug "TimeSeries created.";
|
||||
}
|
||||
my $now = $hash->{".updateTime"};
|
||||
$changed= $ts->elapsed($now);
|
||||
$value= $ts->{$function} if($changed);
|
||||
$ts->add($now, $value);
|
||||
my $val = $value; # save value
|
||||
$changed = $ts->elapsed($now);
|
||||
$value = $ts->{$function} if($changed);
|
||||
$ts->add($now, $val);
|
||||
} else {
|
||||
# If no event-aggregator attribute, then remove stale series if any.
|
||||
delete $readings->{".ts"};
|
||||
|
||||
Reference in New Issue
Block a user