I’m working with esp01_1m
I will use an NTC sensor to acquire the temperature of a boiler, but for now I simulate it with “Tsens”.
Based on the chosen modes and the temperatures “Tsens” (detected) and “TsetOUT” (requested) the system will have to turn on or off two relays
For completeness of information I have to replace the board of an “Energie eco 250 esm” because it is damaged in the logical part and I want to take advantage of this to connect it to my Home Assistant
What it does:
I saw the sensors immediately without any problem and I can control it via Node-red without problems, but I would like to make it independent in case of problems with home assistant so equip it with logical autonomy
The problem:
I can’t implement (because it’s rusty)
When you receive a value from Tsens;
if you are in Normal mode (index =0)
if “Tsens”<“TsetOUT” turn on “resis” and “comp”
otherwise (always if you are in inde=0) turn off “resis” and “comp”
I can’t understand why every time I change the value “Tsens” turns everything off
the thermostat component alone would be fine if the device had to do on/off on a single channel
in my case
Normal: for Tset 45° once 40°C is reached, turn off the heating element and leave the compressor on until 45°C
Eco: for Tsest 45°c always turn off the heating element and leave the compressor on until 45°C
BOOST: for Tsest 45°c leave the compressor and heating element on until 45°C
Disinfect: °Tset =70°C once 55°C is reached, turn off the compressor, leave the heating element on until 70°C and after 15 minutes activate relay 3 for thermostatic by-pass and turn on relay 4 for recirculation, wait 15 minutes, close relay 3 and 4 set the thermostat Normal
OFF: for Tset 10°C once 10°C is reached, turn off the heating element and compressor
Holidays: for Tset 25°C use only the compressor
the file does not compile for the lines above, which are the lines that I cannot insert at that point in the cycle
I cannot make it wait 15 minutes and then turn off the relays
Of course you can but not in lambda, look at the code on post#10.
Delay is in yaml code, not inside lambda.
You can use that structure to rewrite your code section.