Skip to content

Commit

Permalink
fix: only set thermostat commands for master thermostat #110
Browse files Browse the repository at this point in the history
  • Loading branch information
proddy committed Sep 18, 2021
1 parent db34785 commit 09847ee
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/devices/thermostat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,11 @@ std::shared_ptr<Thermostat::HeatingCircuit> Thermostat::heating_circuit(const ui
// returns pointer to the HeatingCircuit or nullptr if it can't be found
// if its a new one, the object will be created and also the fetch flags set
std::shared_ptr<Thermostat::HeatingCircuit> Thermostat::heating_circuit(std::shared_ptr<const Telegram> telegram) {
// only do this for the current master thermostat
if (device_id() != EMSESP::actual_master_thermostat()) {
return nullptr;
}

// look through the Monitor and Set arrays to see if there is a match
uint8_t hc_num = 0;
bool toggle_ = false;
Expand Down

0 comments on commit 09847ee

Please sign in to comment.