       current = body.currently
     catch err
       return msg.send "Could not parse weather data."
-    humidity = current.humidity * 100
+    humidity = (current.humidity * 100).toFixed 0
     temperature = getTemp(current.temperature)
     text = "It is currently #{temperature} #{current.summary}, #{humidity}% humidity"
     msg.send text
 
 lookupForecast = (msg, coords, err) ->
   return msg.send err if err
+  return msg.send "You need to set env.HUBOT_FORECAST_API_KEY to get weather data" if not env.HUBOT_FORECAST_API_KEY
 
   url = forecastIoUrl + coords.lat + ',' + coords.lng
   msg.http(url).query(units: 'ca').get() (err, res, body) ->

      dateToday = new Date(data.time * 1000)
      month = dateToday.getMonth() + 1
      day = dateToday.getDate()
      humidity = data.humidity * 100
      maxTemp = getTemp data.temperatureMax
      minTemp = getTemp data.temperatureMin

      text += "#{month}/#{day} - High of #{maxTemp}ºc, low of: #{minTemp}ºc "
      text += "#{data.summary} #{humidity}% humidity\n"
      text



getTemp = (c) ->
  if env.HUBOT_WEATHER_CELSIUS
    return c.toFixed(0) + "ºC"
  return ((c * 1.8) + 32).toFixed(0) + "ºF"


module.exports = (robot) ->
