Using external weather as a trigger

I recently built - with a lot of help from members of this forum - a Keyboard Maestro macro that compares the outside temperature with temperature inside my house (from a Hue motion sensor). You could re-use the part that gets the outside temperature from the Dark Sky API. It won’t have the pinpoint accuracy of a sensor right outside your house, but your purposes, the more general weather forecast for your area would probably work. It’s described in my blog post here, but the following image should help you get started. Note that you will need to get a Dark Sky API.

The first AppleScript is the relevant part for you. The blurred section is my API key and the bit after that is my longitude and latitude (it’s cut off in the screen shot.)