Temperature discrimination with Window sensor

Hi Everyone,

I am trying to find a smart app that will discriminate between indoor and outdoor temperature (possibly with a ? number of degrees margin) and let me know if a window has been left open, or even better if a window should be open, even better if it has text notification and color changing lights.

For example 1. My window is open, it is 85 degrees outside, 75 degrees inside and I want a temperature of around 70 degrees. So I would be alerted to close the window. Maybe a light would change to red to let me know it is to hot inside.

Example 2. Window is closed, it is 63 degrees outside, 80 degrees inside and I want an indoor temperature of 70 degrees. So I would be alerted to open the window. Maybe the light would change to blue to let me know it is to cold inside.

Example 3. The temp is outside is 72 degrees, the temp inside is 70 degrees so no alert, but the color bulb might be green so that I can see everything is fine.

I have tried a couple of apps to achieve this and nothing seems to do all that I want, or be reliable. I think this could be a cool app that lots of users would like and use, so if anyone can help out creating this app, or have a suggestion to one already made, please let me know.