fix issue with failing off when heatmain is off

This commit is contained in:
Wolfgang Hottgenroth
2018-04-15 17:10:39 +02:00
parent eb90199d97
commit c77f5b9096
2 changed files with 11 additions and 13 deletions

13
dist/MaxThermostat.js vendored
View File

@ -54,13 +54,12 @@ class MaxThermostat extends AHomegearItem_1.AHomegearItem {
setTemperature = true;
}
else if (topic == this.commandTopic) {
if (this.heatingMainFlag) {
if (payload == 'ON') {
this.temperature = this.presetTemperature;
}
else if (payload == 'OFF') {
this.temperature = DISABLED_TEMPERATURE;
}
if ((payload == 'ON') && this.heatingMainFlag) {
this.temperature = this.presetTemperature;
setTemperature = true;
}
else if (payload == 'OFF') {
this.temperature = DISABLED_TEMPERATURE;
setTemperature = true;
}
}