This is embarassing that I have to ask this

So I know enough to be dangerous. I have an sep32 with some temp sensors connected. They are reporting just fine. I want to do some math with them. IE: I have a source temp for a hydronic heating system, I will have several temperatures that will be the return temperature from a hydronic loop. What I want is to subtract the return temp from the source temp and then show that result on a card. Can I do this in the ESPhome Yaml for my esp32?


Try template

With lambda you can get the state of each sensor (by id) on the esp32


So doing something like this maybe?

  - platform: template
    name: "Temperature"
    lambda: |-
      return (id(tempsource).state - id(tempreturn).state);
    update_interval: 5s

Thanks LCL That doesn’t look scary at all :)) I was expecting alot more.