However, in addition to handling the unknown and unavailable sensor problem, the template variable that I posted will be re-evaluted whenever either of the two sensors change.
Oh really? That makes A LOT of sense. I will try that as well. As for now I just changed below and above and also changed -1 to +1 because now it works the opposite way. But yes - thanks for being alerted and mentioning this fact. Someone could actually miss this.
However now at least know how it works. Actually I was even thinking about it when I was doing this automation. “Does it compare both values against each other or only first against second”. But I thought then “Well… it says if A > B so it has to compare both I guess”. Clearly I was mistaken. It compares first against second while the first one change value. Now I get it.
P.S. Which answer in this entire threat should I mark as "SOLLUTION’ now? xD