diff --git a/src/devices/thermostat.cpp b/src/devices/thermostat.cpp index 63ba0ed81..06253315e 100644 --- a/src/devices/thermostat.cpp +++ b/src/devices/thermostat.cpp @@ -379,7 +379,7 @@ std::shared_ptr Thermostat::heating_circuit(std::sha if (set_typeids.size()) { toggle_fetch(set_typeids[hc_num - 1], toggle_); } - if (set2_typeids.size()) { + if (hc_num <= set2_typeids.size()) { toggle_fetch(set2_typeids[hc_num - 1], toggle_); } if (summer_typeids.size()) { @@ -2971,13 +2971,11 @@ bool Thermostat::set_temperature(const float temperature, const uint8_t mode, co factor = 1; break; case HeatingCircuit::Mode::NOREDUCE: - set_typeid = set_typeids[hc->hc()]; validate_typeid = set_typeid; offset = 12; factor = 1; break; case HeatingCircuit::Mode::REDUCE: - set_typeid = set_typeids[hc->hc()]; validate_typeid = set_typeid; offset = 9; factor = 1; diff --git a/src/emsesp.cpp b/src/emsesp.cpp index 56ef42c4a..84fd59029 100644 --- a/src/emsesp.cpp +++ b/src/emsesp.cpp @@ -187,7 +187,7 @@ uint8_t EMSESP::check_master_device(const uint8_t device_id, const uint16_t type // look for heating circuits for (uint8_t i = 0; i < sizeof(mon_ids) / 2; i++) { if (type_id == mon_ids[i] || type_id == set_ids[i] || type_id == summer_ids[i] - || type_id == curve_ids[i] || type_id == summer2_ids[i] || type_id == set2_ids[i]) { + || type_id == curve_ids[i] || type_id == summer2_ids[i] || (i <4 && type_id == set2_ids[i])) { if (read) { // receiving telegrams and map all to master thermostat at 0x18 (src manipulated) return 0x18;