Start Fan if temperature 1 is 2 degrees above temerature 2

Hi,

I will start a Fan if the temperature sensor 1 (oberlicht) is 2 degrees above temperature sensor 2 (wohnzimmer). Is this correct?:

alias: Ventilator OL ein
description: ""
trigger:
  - platform: numeric_state
    entity_id: sensor.temperatursensor_oberlicht_temperature
    above: sensor.temperatursensor_wohnzimmer_temperature
    value_template: "2"
condition: []
action:
  - service: fan.turn_on
    data: {}
    target:
      entity_id: fan.ventilator_ol2
mode: single

No, that will trigger when 2 goes above the wohnzimmer temperature.

I think you can use {{ state.state }} in the value_template, but I’ve written it out in full here.

trigger:
  - platform: numeric_state
    entity_id: sensor.temperatursensor_oberlicht_temperature
    value_template: "{{ states('sensor.temperatursensor_oberlicht_temperature')|float(0) + 2 }}"
    above: sensor.temperatursensor_wohnzimmer_temperature

Cool, thank you :blush::+1: