What I am trying to do is to turn on a pump, when the temperature of the furnace boiler water is above the temperature of the drinking boiler water. (So it heats it up, not cools it down).
I can’t post you a code to put in your automation, but did you consider condition in automation?
I don’t know will it work you have to test it. And there is also a variety of helpers you can create so check it out.
Thans for the reply. Even if I use a condition I would have to somehow write “if temperature from sensors 1 is bigger than temperature from sensors 2”. I don’t know how to put 2 sensor values in one “uf” sentence
I followed the krskrab answer. I made 2 templates with JINJA2. One for when the temperature is higher and when when the temperature is lower. Trigered when it returns TRUE.
The trigere then turns on a a smartdevice.
i can be more detailed when I perfect it e.g. when I make it actually work reliably.
I tested it and it worked. I can also see it in the logs
<Image missing as I don’t have the right to post it as a new user>
I’ve also set the Sonoff devices as high pripority in my network and this seemed to have helped. Or the reboot of the HomeAutomation helped. At the moment it runs on the VM over wifi, will put it on a raspberr once I get my hand on one.