Hi,
I have a mqtt temperature sensor sensor.teplota_obyvak and a temperature slider input_number.cilova_teplota that I want to set up and call automation accordingly, but it does not work. What am I doing wrong? If the temperature sensor is higher than the input slider, open the cover.
States are strings, and comparing string representations of numbers often will not work as you expect. You need to convert to numbers before doing the comparison. Try this:
Probably because sometimes string representations of numbers compare the same way as the numbers themselves, but sometimes they don’t. E.g., '11' > '10' is true, but '11' > '9' is not. You need the float conversion.