fix in heating main switch handling

This commit is contained in:
Wolfgang Hottgenroth
2018-04-12 09:03:15 +02:00
parent 62303cf27e
commit eb90199d97
2 changed files with 6 additions and 4 deletions

View File

@ -68,8 +68,9 @@ class MaxThermostat extends AHomegearItem_1.AHomegearItem {
this.heatingMainFlag = (payload == 'ON');
logger.info(`${this.itemId} heating main: ${this.heatingMainFlag}`);
if (!this.heatingMainFlag) {
MqttDispatcher_1.mqttHandler.send(this.temperatureFeedbackTopic, `${DISABLED_TEMPERATURE}`);
MqttDispatcher_1.mqttHandler.send(this.actionTopic, `${DISABLED_TEMPERATURE}`);
this.temperature = DISABLED_TEMPERATURE;
MqttDispatcher_1.mqttHandler.send(this.temperatureFeedbackTopic, `${this.temperature}`);
MqttDispatcher_1.mqttHandler.send(this.actionTopic, `${this.temperature}`);
}
}
else if (topic == this.presetTemperatureTopic) {

View File

@ -93,8 +93,9 @@ export class MaxThermostat extends AHomegearItem implements HasInTopic {
this.heatingMainFlag = (payload == 'ON')
logger.info(`${this.itemId} heating main: ${this.heatingMainFlag}`)
if (! this.heatingMainFlag) {
mqttHandler.send(this.temperatureFeedbackTopic, `${DISABLED_TEMPERATURE}`)
mqttHandler.send(this.actionTopic, `${DISABLED_TEMPERATURE}`)
this.temperature = DISABLED_TEMPERATURE
mqttHandler.send(this.temperatureFeedbackTopic, `${this.temperature}`)
mqttHandler.send(this.actionTopic, `${this.temperature}`)
}
} else if (topic == this.presetTemperatureTopic) {
this.presetTemperature = parseFloat(payload)