Skip to content

Commit

Permalink
requested changes on PR from @MichaelDvP
Browse files Browse the repository at this point in the history
  • Loading branch information
tp1de committed May 27, 2022
1 parent 622a5db commit 107106d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions src/devices/thermostat.cpp
Expand Up @@ -379,7 +379,7 @@ std::shared_ptr<Thermostat::HeatingCircuit> 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()) {
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/emsesp.cpp
Expand Up @@ -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;
Expand Down

0 comments on commit 107106d

Please sign in to comment.