2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 18:59:33 +00:00

MAX: fix off-by-one error

git-svn-id: https://svn.fhem.de/fhem/trunk@4217 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
mgehre 2013-11-14 09:39:26 +00:00
parent a6ba29bfe2
commit 43e9e3f47b

View File

@ -733,13 +733,13 @@ MAX_Parse($$)
readingsBulkUpdate($shash, "maximumTemperature", MAX_SerializeTemperature($args[2]));
readingsBulkUpdate($shash, "minimumTemperature", MAX_SerializeTemperature($args[3]));
readingsBulkUpdate($shash, ".weekProfile", $args[4]);
if(@args >= 4) { #HeatingThermostat and WallThermostat with new firmware
if(@args > 5) { #HeatingThermostat and WallThermostat with new firmware
readingsBulkUpdate($shash, "boostValveposition", $args[5]);
readingsBulkUpdate($shash, "boostDuration", $boost_durations{$args[6]});
readingsBulkUpdate($shash, "measurementOffset", MAX_SerializeTemperature($args[7]));
readingsBulkUpdate($shash, "windowOpenTemperature", MAX_SerializeTemperature($args[8]));
}
if(@args >= 8) { #HeatingThermostat
if(@args > 9) { #HeatingThermostat
readingsBulkUpdate($shash, "windowOpenDuration", $args[9]);
readingsBulkUpdate($shash, "maxValveSetting", $args[10]);
readingsBulkUpdate($shash, "valveOffset", $args[11]);