FHEM/14_CUL_WS.pm: Some more safety checks for the S300TH

git-svn-id: svn://svn.code.sf.net/p/fhem/code/trunk@10794 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig
2016-02-11 06:26:06 +00:00
parent 8fdb439cf2
commit ee585977d8

View File

@@ -269,15 +269,17 @@ CUL_WS_Parse($$)
$NotifyIsRaining=$ir; $NotifyIsRaining=$ir;
} elsif(int(@a) > 8) { # WS7000 Temp/Hum sensors } elsif(int(@a) > 8) { # WS7000 Temp/Hum sensors
$sgn = ($firstbyte&8) ? -1 : 1; if(join("", @a[3..8]) =~ m/^\d*$/) { # Forum 49125
$tmp = $sgn * ($a[6].$a[3].".".$a[4]) + $hash->{corr1}; $sgn = ($firstbyte&8) ? -1 : 1;
$hum = ($a[7].$a[8].".".$a[5]) + $hash->{corr2}; $tmp = $sgn * ($a[6].$a[3].".".$a[4]) + $hash->{corr1};
$val = "T: $tmp H: $hum"; $hum = ($a[7].$a[8].".".$a[5]) + $hash->{corr2};
$devtype = "TH".$sfirstbyte; $val = "T: $tmp H: $hum";
$family = "WS7000"; $devtype = "TH".$sfirstbyte;
$NotifyType="T H"; $family = "WS7000";
$NotifyTemperature=$tmp; $NotifyType="T H";
$NotifyHumidity=$hum; $NotifyTemperature=$tmp;
$NotifyHumidity=$hum;
}
} }
} }