Help triggering turning off attic fan when ambient is within 15 degrees of outside

Figured out the float template to get the outside temp but I’m struggling to make the if/then trigger. I’m getting better with the template stuff but I’m still learning.

- id: '1597258970676'
  alias: Attic Fan off when 15 more than outside
  description: ''
  trigger:
  - platform: template
    value_template: "”{{ state_attr('weather.openweathermap', 'temperature') | float\
      \ + 15\n      }}”"
  condition:
  - condition: template
    value_template: ''
  action:
  - device_id: 753b3b4e030845fdb0a72959124e47f7
    domain: switch
    entity_id: switch.jasco_products_14288_duplex_receptacle_switch
    type: turn_off
  mode: single

This is the attic temp sensor: sensor.vision_security_zp3111_multisensor_4in1_temperature

There’s a few things that need fixing with that.

  1. Don’t use fancy quotes.
  2. Only use one set of quotes outside the template.
  3. You are missing the attic temperature in your template.
  4. Trigger templates must resolve to true or false. Where is the logical test?
  5. Not sure what this is: \ \ + 15\n

You need something like this:

value_template: "{{ state_attr('weather.openweathermap', 'temperature')|float < ( states('sensor.vision_security_zp3111_multisensor_4in1_temperature')|float +15 ) }}"

Assuming from your automation title and topic title that you want the attic fan to turn off when the attic temperature is 15 degrees greater than your outside temperature.