Inkbird BT thermometer iBBQ Templet Help

I Inkbird BT thermometer. When a probe is not plugged in to one of the available slots the temp will read 32 °F. I was trying to create a sensor template that would show “Off” is the value was = to 32 otherwise show the current temp. I been trying different things but haven’t got it to work. One example is below. Thank you!

  - platform: template
    sensors:
      bbq_temp_sensor_4:
        value_template: '{% if states.sensor.ibbq_temperature_probe_4 %}
          {% if states.sensor.ibbq_temperature_probe_4 == "32" %}
            Off
          {% endif %}
          {% else %}
          n/a
          {% endif %}'
        friendly_name: 'BBQ Temp Sensor 4'

The way to build these it to go into developer tools / templates and put your value template expression in there, then you can work on it until you get it right,

This may be a simpler approach, just use the availability_template.

  - platform: template
    sensors:
      bbq_temp_sensor_4:
        value_template: “{{ states(‘sensor.ibbq_temperature_probe_4’) }}”
        availability_template: “{{ states(‘sensor.ibbq_temperature_probe_4’)|int(0) != 32 }}”

PeteRage, thank you for pointing me in the right direction.
I have never used the Developer Tools, Template before. I got it working they way I wanted, using the template below.

  - platform: template
    sensors:
      bbq_temp_sensor_1:
        value_template: '{% if states.sensor.ibbq_temperature_probe_1 %}
          {% if states.sensor.ibbq_temperature_probe_1.state == "32" %}
            Off
          {% else %}
            {{ states.sensor.ibbq_temperature_probe_1.state }}
          {% endif %}
          {% else %}
            n/a
          {% endif %}'
        friendly_name: 'BBQ Temp Sensor 1'
        icon_template: mdi:thermometer

1 Like