mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 15:59:52 +03:00
revert back subscription of only active heating circuits
This commit is contained in:
@@ -1448,16 +1448,13 @@ void MQTTCallback(unsigned int type, const char * topic, const char * message) {
|
||||
char topic_s[50];
|
||||
char buffer[4];
|
||||
for (uint8_t hc = 1; hc <= EMS_THERMOSTAT_MAXHC; hc++) {
|
||||
// subscribe onlyto active hc
|
||||
if (EMS_Thermostat.hc[hc - 1].active) {
|
||||
strlcpy(topic_s, TOPIC_THERMOSTAT_CMD_TEMP_HA, sizeof(topic_s));
|
||||
strlcat(topic_s, itoa(hc, buffer, 10), sizeof(topic_s));
|
||||
myESP.mqttSubscribe(topic_s);
|
||||
strlcpy(topic_s, TOPIC_THERMOSTAT_CMD_TEMP_HA, sizeof(topic_s));
|
||||
strlcat(topic_s, itoa(hc, buffer, 10), sizeof(topic_s));
|
||||
myESP.mqttSubscribe(topic_s);
|
||||
|
||||
strlcpy(topic_s, TOPIC_THERMOSTAT_CMD_MODE_HA, sizeof(topic_s));
|
||||
strlcat(topic_s, itoa(hc, buffer, 10), sizeof(topic_s));
|
||||
myESP.mqttSubscribe(topic_s);
|
||||
}
|
||||
strlcpy(topic_s, TOPIC_THERMOSTAT_CMD_MODE_HA, sizeof(topic_s));
|
||||
strlcat(topic_s, itoa(hc, buffer, 10), sizeof(topic_s));
|
||||
myESP.mqttSubscribe(topic_s);
|
||||
}
|
||||
|
||||
// generic incoming MQTT command for Thermostat
|
||||
|
||||
Reference in New Issue
Block a user