Automation help - toggle switch based on temperature

Hi,
I am trying to get a simplistic automation working (or so i hoped), where when a temperature is detected above X, that a switch is turned on. Then when its below Y, it turns off again.

The idea is that a Zooz temperature sensor (ZSE11) will control when a fan will turn on in my attic, with the fan having a simplistic control method of a Zooz ZEN15 plug.

I have begun with just the ‘turn on’ when above, and I would guess I’ll need an entirely separate ‘turn off’ automation too, but what I have, despite making sense in the GUI, does not work whatsoever in testing (with a lower temperature of course).

Current YAML -

alias: Attic - Turn Fan On
description: Turns on roof fan when temperature goes above 100F
trigger:
  - type: temperature
    platform: device
    device_id: xyzabc123
    entity_id: sensor.attic_sensor_air_temperature
    domain: sensor
    above: 60
condition: []
action:
  - type: turn_on
    device_id: xyzabc123
    entity_id: switch.attic_fan
    domain: switch
mode: single

I have also tried with the trigger instead being a condition, but it just doesnt work whatsoever.

Am i missing something obvious here?

Thanks in advance!

A better option would be to implement this:

That’s actually a pretty good idea. I may look into that.

Just to close a loop of as it were, turns out the automation does work as-is. It only activates once it goes above the test temperature, so if it was already above…nothing.