Living in a house with no central air conditioning can be difficult during a sunny San Jose, California summer, and running portable AC units with no solar is not kind to one's wallet. 

Luckily for me, the outside air temperature at night typically drops to the low 60s (Fahrenheit) – and it's free. 

A couple rooms in my house happen to use 20"x20" windows which is the same size as a standard three-speed box fan. I placed it in an upstairs window, and used it to push air out of the house. When it was on I opened other windows which, due to the negative pressure created by the exodus of hot air, sucked the cool outside air in. 

After doing this manually, I decided I'd smarten up and in turn smarten up my cooling system. This took place over time. 

The first step was adding a smart plug and connecting the fan to Home Assistant. From there, I realized I often wanted the fan to start working when I wasn't home, so I needed a way to monitor temperature so the fan could turn on at the exact right time. I connected to Climacell via API to get the outside air temperature (OAT), and to a local temp sensor for the comparison. 

Once the window was open, the trigger for the fan to turn on was OAT < interior temperature. For a while, I had a hardcoded cutoff at 66 degrees so my house wouldn't get too cold. Once the fan turned off, it wouldn't turn back on until dawn. This was the logic for two summers. 

--- Improvements over time ---

- When California had horrible fires, I added an AQI integration from AirVisual which, when the AQI >=100 not only turns on my air purifier, but also turns off the fan and notifies me via Telegram to close the window. 

- Last year I had a lightbulb moment and swapped my hardcoded 66 degree shut-off trigger for a Home Assistant generic thermostat integration. Now when the fan is running and the temp drops below the set-point by 0.5 degrees the fan turns off. It turns itself back on when the temp hits 0.5 degrees above the set-point. This resulted in a perfectly cooled house when I got up every morning rather than playing a guessing game. 

--- What could still be done? ---

- I could make this system faster by adding a second box fan to the other 20"x20" window in the room, but I've been perfectly happy with its speed so I haven't felt the need to do this.