diff --git a/src/devices/thermostat.cpp b/src/devices/thermostat.cpp index f0118879f..386e80ed2 100644 --- a/src/devices/thermostat.cpp +++ b/src/devices/thermostat.cpp @@ -252,7 +252,7 @@ std::shared_ptr Thermostat::heating_circuit(const in // if its a new one, the heating circuit object will be created and also the fetch flags set std::shared_ptr Thermostat::heating_circuit(std::shared_ptr telegram) { // look through the Monitor and Set arrays to see if there is a match - uint8_t hc_num = 0; + uint8_t hc_num = 0; // 0 means we haven't found it yet bool toggle_ = false; // search device-id types for remote thermostats first, they have only a single typeid for all hcs @@ -269,8 +269,10 @@ std::shared_ptr Thermostat::heating_circuit(std::sha toggle_ = true; break; } + Serial.println(); } } + // not found, search status message/set types if (hc_num == 0) { for (uint8_t i = 0; i < set_typeids.size(); i++) { diff --git a/src/devices/thermostat.h b/src/devices/thermostat.h index 3e4ba7f3f..c1da03c52 100644 --- a/src/devices/thermostat.h +++ b/src/devices/thermostat.h @@ -109,6 +109,7 @@ class Thermostat : public EMSdevice { return hc_num_; } + // returns heating circuit number 0..9 uint8_t hc() const { return hc_num_ - 1; }