Smart Fan Control?

I’m looking to control my bedroom window fan as a function of inside and outside temperature. Something like:

IF (Inside temp >65) THEN {
IF (Inside temp > Outside temp) THEN {
BedroomWindowFAN = ON
}
}
ELSE {
BedroomWindowFan = OFF
}

Should this be a no-brainer?

I was looking for the same thing a few months ago. I was told to try this app. Whole House Fan
Created by: Brian Steere.
Scroll down a couple of times on this link and that should give you the info on the app. http://blog.smartthings.com/news/smartthings-updates/5-new-smartapps-2/

Yea, can be shortened up somewhat…

if (insideTemp > setPoint && insideTemp > outsideTemp) {
  fan(on)
} else {
  fan(off)
}

Or use Brians app…