         msg.send "It is currently #{json.main.temp} #{named_unit} in #{json.name}."
 
   robot.respond /forecast (.*)/i, (msg) ->
-    forecastFor(msg, msg.match[1])
+    forecastFindCoordinates(msg, msg.match[1])
 
-  forecastFor = (msg, input) ->
-    robot.http(forecastURL + input + "&appid=" + apiKey + "&units=" + units)
+  robot.respond /forecast$/i, (msg) ->
+    if cities
+      for city in cities.split(/\s*;\s*/)
+        forecastFindCoordinates(msg, city)
+
+  forecastFindCoordinates = (msg, input) ->
+    robot.http(findWeatherCoordinatesURL + input + "&appid=" + apiKey )
       .get() (err, res, body) ->
         if err
           msg.send "Encountered an error :( #{err}"
           return
         json = JSON.parse body
-        msg.send "today we will have #{json.list[0].main.temp} #{named_unit} with #{json.list[0].weather[0].description} and feels like #{json.list[0].main.feels_like} #{named_unit}.\n Tomorrow we will have #{json.list[1].main.temp} #{named_unit} with #{json.list[1].weather[0].description} and feels like #{json.list[1].main.feels_like} #{named_unit}.\n The day after we will have #{json.list[2].main.temp} #{named_unit} with #{json.list[2].weather[0].description} and feels like #{json.list[2].main.feels_like} #{named_unit}.
+        coordinates = "lat=#{json.list[0].coord.lat}&lon=#{json.list[0].coord.lon}"
+        forecastFor(msg, coordinates)
+
+  forecastFor = (msg, input) ->
+    robot.http(forecastURL + input + "&appid=" + apiKey + "&units=" + units + "&exclude=hourly,minutely")
+      .get() (err, res, body) ->
+        if err
+          msg.send "Encountered an error :( #{err}"
+          return
+        json = JSON.parse body
+        msg.send "today we will have #{json.daily[0].temp.day} #{named_unit} with #{json.daily[0].weather[0].description} and feels like #{json.daily[0].feels_like.day} #{named_unit}.\n Tomorrow we will have #{json.daily[1].temp.day} #{named_unit} with #{json.daily[1].weather[0].description} and feels like #{json.daily[1].feels_like.day} #{named_unit}.\n The day after we will have #{json.daily[2].temp.day} #{named_unit} with #{json.daily[2].weather[0].description} and feels like #{json.daily[2].feels_like.day} #{named_unit}."
+
   named_unit = switch
     when units == "metric" then "°C"
     when units == "imperial" then "°F"

# Commands:
#   hubot weather         provide weather information for the default cities
#   hubot weather <city>  provide weather information for a <city>
#   hubot forecast <city>  provide weather forecast for a <city>
#   hubot weather help    explain OpenWeatherMap commands
#
# Author:

#   github.com/tan3

weatherURL = process.env.HUBOT_OPEN_WEATHER_MAP_URL or 'http://api.openweathermap.org/data/2.5/weather?q='
findWeatherCoordinatesURL = process.env.HUBOT_OPEN_WEATHER_MAP_FIND_COORDINATES or 'http://api.openweathermap.org/data/2.5/find?q='
forecastURL = process.env.HUBOT_OPEN_WEATHER_MAP_FORECAST_URL or 'http://api.openweathermap.org/data/2.5/onecall?'
coordinates = process.env.HUBOT_OPEN_WEATHER_MAP_DEFAULT_COORDINATES
cities     = process.env.HUBOT_OPEN_WEATHER_MAP_DEFAULT_CITIES
apiKey     = process.env.HUBOT_OPEN_WEATHER_MAP_APIKEY
units      = process.env.HUBOT_OPEN_WEATHER_MAP_UNITS or 'imperial'
