Assistance with device_class: heat ----> value_template: (please)

Wow, complex.

My suggestion: create the binary_sensor inside configuration.yaml.

If it’s a binary sensor that is written for Home Assistant, it goes in configuration.yaml. If it’s written for ESPHome it goes in the ESPHome YAML. Binary Sensors with templates like this go in configuration.yaml.

Hi, I would like to do a similar project with a wood stove.

I have an ESP32 with a Max6675 termocouple which gives me fire temperature.

  - platform: max6675
    name: "Temperatura Stufa"
    cs_pin: GPIO15
    update_interval: 30s
    id: fire_temp

I would like a sensor that gives me this information:

From 0 to 50 degrees = OFF
From 50 to 150 degrees = CHECK FIRE
From 150 to 300 degrees = FIRE OK

How can i get this?


I want to be able to control a light that is on an ESP32, from anther ESP32.


Apologies for the delayed response.
@rlust @KameDomotics
I did get this to work by adding the following code into the ESPyaml

  - platform: gpio
      number: GPIO5
      mode: INPUT_PULLUP
      inverted: True
    id: fp_state
    name: "Fireplace state"
    device_class: heat
  - platform: template
    name: Fireplace sensor
    device_class: heat
    lambda: |-
      if (id(fireplacetemp).state > 30) {
        // Fireplace is on
        return true;
      } else {
        // Fireplace is off
        return false;

Although i am not using it at the moment (1. its summer here and 2. I have just updated to a power monitor which does not have to wait for the temp to hit target.

1 Like