2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-08 19:32:42 +00:00

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

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

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";