fix issue with failing off when heatmain is off
This commit is contained in:
13
dist/MaxThermostat.js
vendored
13
dist/MaxThermostat.js
vendored
@ -54,13 +54,12 @@ class MaxThermostat extends AHomegearItem_1.AHomegearItem {
|
|||||||
setTemperature = true;
|
setTemperature = true;
|
||||||
}
|
}
|
||||||
else if (topic == this.commandTopic) {
|
else if (topic == this.commandTopic) {
|
||||||
if (this.heatingMainFlag) {
|
if ((payload == 'ON') && this.heatingMainFlag) {
|
||||||
if (payload == 'ON') {
|
this.temperature = this.presetTemperature;
|
||||||
this.temperature = this.presetTemperature;
|
setTemperature = true;
|
||||||
}
|
}
|
||||||
else if (payload == 'OFF') {
|
else if (payload == 'OFF') {
|
||||||
this.temperature = DISABLED_TEMPERATURE;
|
this.temperature = DISABLED_TEMPERATURE;
|
||||||
}
|
|
||||||
setTemperature = true;
|
setTemperature = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -81,12 +81,11 @@ export class MaxThermostat extends AHomegearItem implements HasInTopic {
|
|||||||
this.temperature = parseFloat(payload)
|
this.temperature = parseFloat(payload)
|
||||||
setTemperature = true
|
setTemperature = true
|
||||||
} else if (topic == this.commandTopic) {
|
} else if (topic == this.commandTopic) {
|
||||||
if (this.heatingMainFlag) {
|
if ((payload == 'ON') && this.heatingMainFlag) {
|
||||||
if (payload == 'ON') {
|
this.temperature = this.presetTemperature
|
||||||
this.temperature = this.presetTemperature
|
setTemperature = true
|
||||||
} else if (payload == 'OFF') {
|
} else if (payload == 'OFF') {
|
||||||
this.temperature = DISABLED_TEMPERATURE
|
this.temperature = DISABLED_TEMPERATURE
|
||||||
}
|
|
||||||
setTemperature = true
|
setTemperature = true
|
||||||
}
|
}
|
||||||
} else if (topic == MaxThermostat.heatingMainSwitchTopic) {
|
} else if (topic == MaxThermostat.heatingMainSwitchTopic) {
|
||||||
|
Reference in New Issue
Block a user