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
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.

Yea, can be shortened up somewhat…

if (insideTemp > setPoint && insideTemp > outsideTemp) {
} else {

Or use Brians app…