mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-04 22:19:38 +00:00
98_logProxy.pm: allow Func to return avg and sum
git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@21142 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
6647498833
commit
b2e2af3738
@ -1060,7 +1060,7 @@ logProxy_Get($@)
|
|||||||
$fld[1] = join( ':', @fld[1..@fld-1]);
|
$fld[1] = join( ':', @fld[1..@fld-1]);
|
||||||
#my $fromsec = SVG_time_to_sec($from);
|
#my $fromsec = SVG_time_to_sec($from);
|
||||||
#my $tosec = SVG_time_to_sec($to);
|
#my $tosec = SVG_time_to_sec($to);
|
||||||
my ($r,$min,$max,$last,$xmin,$xmax) = eval $fld[1];
|
my ($r,$min,$max,$last,$xmin,$xmax,$avg,$sum) = eval $fld[1];
|
||||||
if( $@ ) {
|
if( $@ ) {
|
||||||
Log3 $hash->{NAME}, 1, "$hash->{NAME}: $fld[1]: $@";
|
Log3 $hash->{NAME}, 1, "$hash->{NAME}: $fld[1]: $@";
|
||||||
next;
|
next;
|
||||||
@ -1071,6 +1071,8 @@ logProxy_Get($@)
|
|||||||
$data{"currval$j"} = $last;
|
$data{"currval$j"} = $last;
|
||||||
$data{"xmin$j"} = $xmin;
|
$data{"xmin$j"} = $xmin;
|
||||||
$data{"xmax$j"} = $xmax;
|
$data{"xmax$j"} = $xmax;
|
||||||
|
$data{"avg$j"} = $avg;
|
||||||
|
$data{"sum$j"} = $sum;
|
||||||
|
|
||||||
$ret .= $r;
|
$ret .= $r;
|
||||||
$ret .= "#$a[$i]\n";
|
$ret .= "#$a[$i]\n";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user