From 09847ee33c1d873bb0e36e90c0d0b0c15a5d6b7b Mon Sep 17 00:00:00 2001 From: proddy Date: Sat, 18 Sep 2021 09:52:02 +0200 Subject: [PATCH] fix: only set thermostat commands for master thermostat #110 --- src/devices/thermostat.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/devices/thermostat.cpp b/src/devices/thermostat.cpp index 45ce1a6ad..7a44c84f5 100644 --- a/src/devices/thermostat.cpp +++ b/src/devices/thermostat.cpp @@ -251,6 +251,11 @@ std::shared_ptr 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::heating_circuit(std::shared_ptr 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;