WeatherBot goes outside

code • March 1, 2017

Last week I talked about how I built a WeatherBot that gives us a heads up if there will be snow over the next several hours. The recent warm weather inspired me to add warm weather alerts:

WeatherBot Slack Post
Cloudy and warm
Partly cloudy WeatherBot
Party cloudy and warm

How it works

  1. Get the current weather data.
  2. If the temperature is between 50℉ and 90℉ and there probably won’t be any precipitation (less than 20% chance), post to Slack.
  3. Also, translate the Dark Sky icon in the request to an emoji and use that for the Slack message icon to show just how nice the weather is right now. (I modified the original post to Slack script to include a parameter for emoji to help make this fun little feature happen.)

I’m looking forward to using this bot as a reminder to close my laptop and go for a walk.

Keep reading code