HM-WDS10-TH-O negative temp fix by fhem-hm-knecht

git-svn-id: svn://svn.code.sf.net/p/fhem/code/trunk@1233 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig
2012-02-04 09:23:17 +00:00
parent 4d72e06502
commit 0cf4155347

View File

@@ -662,8 +662,9 @@ CUL_HM_Parse($$)
if($p =~ m/^(....)(..)$/) {
my ($t, $h) = ($1, $2);
$t = hex($t)/10;
$t -= 3276.8 if($t > 1638.4);
$t = hex($t);
$t -= 32768 if($t > 16384);
$t = sprintf("%0.1f", $t/10);
$h = hex($h);
push @event, "state:T: $t H: $h";
push @event, "temperature:$t";