I would like to compare two temperatures measured with dallas sensors, and I guess that some kind of template sensor with a lambda would be the way to go. But I cannot find out how to do it.
I’m not sure how you’re going to use hotornot, but if you don’t need it to be published to Home Assistant, then you may not need to create a new template sensor. You could just use the same lambda statement where ever else you use the value.
That works like a charm. Thank you.
Good point on not needing the template sensor, it’s supposed to start a fan so I will use it in an automation instead.
If you would like to publish the hotornot value to HA, what do you need to add to the ESPHome config? I tried several options among on_value but at compling I get a error. Any suggestions?