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

git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@1233 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2012-02-04 09:23:17 +00:00
parent b06c75c447
commit 3dad2027ce

View File

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