10_ZWAve.pm: ignore extra length for THERMOSTAT_SETPOINT (Forum #142142)

git-svn-id: https://svn.fhem.de/fhem/trunk@30158 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig
2025-07-28 15:34:20 +00:00
parent 3fe35a8f5c
commit 3c07d47f56

View File

@@ -1626,12 +1626,12 @@ ZWave_thermostatSetpointParse ($$)
my $scale = (((hex($2) & 0x18)>>3) == 1) ? "F": "C";
my $size = (hex($2) & 0x07);
if (length($3) != $size*2) {
if (length($3) < $size*2) {
Log3 $name, 1, "$name: THERMOSTAT_SETPOINT_REPORT "
."wrong number of bytes received";
return;
}
my $sp = hex($3);
my $sp = hex(substr($3, 0, $size*2)); # 142142
$sp -= (2 ** ($size*8)) if $sp >= (2 ** ($size*8-1));
$sp = $sp / (10 ** $prec);