Hello everyone!
I have two thermostats on one Esp controlling ONE relay.
I need to make an automation so that when I switch one thermostat to “Heat” from “OFF”, the second one should immediately switch to “OFF” from “Heat” and vice versa.
It seems that I should use lambda, but I do not know C++.
I dont understand why you have 2 thermostats one for heat and 1 for cool when just 1 thermostat is perfectly capable of doing what you need.
What device or hardware is the second thermostat switching to Off?
You only meantioned one relay so are you switching some other relay or is this 1 relay where COM/NC is Heat and COM/NO is cool? I wouldn’t personally recommend doing that but your setup is a mystery and so is 2 thermostats.
I think I should describe my setup in details.
I have a boiler which is controlled using dry contact - ON and OFF.
I have a ESP with relay, which controls the dry contact.
During winter the boiler is used for heating of my house, using indoor temperature.
During summer the boiler is used to heat the pool, using water temperature.
Therefore, I have TWO “virtual” thermostats one for winter, one for summer. However, they should “interlock” each other, not to work at the same time. So, when one thermostat is switch to heating, the second one should switch off and vice versa.
Each thermostat has its own:
temperature range
temperature source
If anyone has other suggestions how I can arrange this work, I would be grateful for your suggestions.
So, make 2 thermostats. One for summer/heating pool and the other for heating the house.
Since only one thermostat should be active then how do we do that? You have a few ways of doing that.
Both thermostats start in the “OFF” mode/preset untill you manually activate one.
Check condition/s. You can check for seasons, specific dates/months. For example here in the US the swimming pools always open on Memorial day(May 27) and they always close on Labor day(September 2). So for me I could check conditions like this.
Is Season Fall OR Winter
Is Season Spring or Summer?
Is current date May 27 or is it after May 27 and before Sept 2?
So, condition 1 didnt pass. Its not fall or winter.
Condition 2 is true, the current season is Spring and condition 3 also passed, the current date is between May27-Sept.2.
Since those are true we know its summer and the pool is what needs heat, therfore set “Summer Thermostat” from Mode - Off or Preset Off to Mode Auto or your custom Preset #, or Heat mode etc, etc.