2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-10 09:16:53 +00:00

10_ZWave.pm: some THERMOSTAT_SETPOINT_REPORT patches (Forum #79659)

git-svn-id: https://svn.fhem.de/fhem/trunk@15439 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2017-11-17 10:42:41 +00:00
parent 28986c64ae
commit ebaf24f8d1

View File

@ -1481,13 +1481,12 @@ ZWave_thermostatSetpointParse ($$)
my $scale = (((hex($2) & 0x18)>>3) == 1) ? "F": "C";
my $size = (hex($2) & 0x07);
if (length($3) != $size*2) {
Log3 $name, 1, "$name: THERMOSTAT_SETPOINT_REPORT "
."wrong number of bytes received";
return;
}
my $sp = hex($3);
$sp -= (2 ** ($size*8)) if $sp >= (2 ** ($size*8-1));
if(length($3) != $size*2) {
$sp = ($sp & 0xfff0000) >> 16; #79659, Temporary?
} else {
$sp -= (2 ** ($size*8)) if($sp >= (2 ** ($size*8-1)));
}
$sp = $sp / (10 ** $prec);
# output temperature with variable decimals as reported (according to $prec)