2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-13 23:36:37 +00:00

rain_diff removed, was buggy

git-svn-id: https://svn.fhem.de/fhem/trunk@486 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2009-11-25 10:47:14 +00:00
parent 86a1254c48
commit 013a55c0f8

View File

@ -91,11 +91,11 @@ KS300_Parse($$)
my @v;
my @txt = ( "rain_raw", "rain", "wind", "humidity", "temperature",
"israining", "unknown1", "unknown2", "unknown3","rain_now");
my @sfx = ( "(counter)", "(l/m2)", "(km/h)", "", "",
"(yes/no)", "","","","");
"israining", "unknown1", "unknown2", "unknown3");
my @sfx = ( "(counter)", "(l/m2)", "(km/h)", "(%)", "(Celsius)",
"(yes/no)", "","","");
my %repchanged = ("rain"=>1, "wind"=>1, "humidity"=>1, "temperature"=>1,
"israining"=>1, "rain_diff" =>1);
"israining"=>1);
# counter for the change hash
my $n= 1; # 0 is STATE and will b explicitely set
@ -218,13 +218,6 @@ KS300_Parse($$)
$v[6] = $a[29];
$v[7] = $a[16];
$v[8] = $a[17];
if($v[1]){ # rain diff
my $rain_old = $def->{READINGS}{'rain'}{VAL};
$rain_old =~ s/[^0123456789.]//g;
$v[9] = $v[1] - $rain_old;
} else {
$v[9] = 0;
}
# Negative temp
$v[4] = -$v[4] if($v[8] & 8);
@ -279,6 +272,7 @@ KS300_Parse($$)
$difft = $sec - $ssec;
$difft += 86400 if($d[2] != $sd[2]); # Sec since last reading
$difft = 1 if(!$difft); # Don't want illegal division.
$t /= $difft; $h /= $difft; $w /= $difft; $e = $v[1] - $cv[9];
$r->{avg_day}{VAL} =
sprintf("T: %.1f H: %d W: %.1f R: %.1f", $t, $h, $w, $e);