 KV_KEY = 'forecast-alert-datapoint'
 LOCATION = process.env.HUBOT_LATITUDE + ',' + process.env.HUBOT_LONGITUDE
 PROBABILITY_THRESHOLD = process.env.HUBOT_FORECAST_PROBABILITY_THRESHOLD || 0.75
+FORECASTKEY = process.env.HUBOT_FORECAST_KEY
+UNITTYPE = process.env.HUBOT_FORECAST_UNITS || 'si'
+EXCLUDE = 'flags'
 
 activeDays = (process.env.HUBOT_FORECAST_DAYS ? 'mon,tue,wed,thu,fri')
   .toLowerCase()

last_json = {}

module.exports = (robot) ->
  postWeatherAlert = (json, callback) ->
    postMessage = callback
    now = new Date()

          handleWeather(json, callback)

  fetchForecast = (callback) ->
    base_url = "https://api.forecast.io/forecast/#{FORECASTKEY}/#{LOCATION}"
    url = "#{base_url}?units=#{UNITTYPE}&exclude=#{EXCLUDE}"

    console.log "[Forecast] Requesting forecast data: #{url}"

