Depends on how fool proof you want it to be.
There are a lot of ways to do it, none more right/wrong than the other.
Assuming you have a smart switch on the fan that reports physical on/off events separately from digital on/off events, I would do it as 2 rules + a global variable.
Rule 1 - Manual control
Triggers: Fan switch ON (physical), Fan switch OFF (physical or digital)
Action for ON: Set Global Variable to "manual"
Action for OFF: Set Global Variable to "none"
Rule 2 - Automatic control
Triggers: Temp>102, Temp<96
Action for hot: If temp>102 AND global variable = "none", set global variable to "auto", turn on fan
Action for cold: If temp<96 AND global variable = "auto", set global variable to "none", turn off fan
If your switch doesn't distinguish from physical and digital events, then you would need to be a little more careful on the logic - just use all on events in rule 1, and use global variable="none" as an ON condition. Then make sure there is a delay between setting the global variable and turning on the fan in rule #2. Like this:
Rule 1 - Manual control
Triggers: Fan switch ON, Fan switch OFF
Action for ON: IF global variable="none", Set Global Variable to "manual"
Action for OFF: Set Global Variable to "none"
Rule 2 - Automatic control
Triggers: Temp>102, Temp<96
Action for hot: If temp>102 AND global variable = "none", set global variable to "auto", delay 5 seconds (to make sure global variable gets updated before rule 1 sees the ON event), turn on fan
Action for cold: If temp<96 AND global variable = "auto", set global variable to "none", turn off fan
Technically that makes the global variable get set to "none" 2x every time the fan is turned off, but I don't see that as a big deal. If you are OCD and don't like that, add a IF global variable <> "none" on the Rule 1 OFF action.