Improved effiency

This commit is contained in:
Maximilian Giller 2019-03-09 15:48:31 +01:00
parent 26bdceb22e
commit 5ad6dff6fb

View file

@ -30,6 +30,9 @@ class OwmForecasts (WeatherInterface):
return self.__get_forecast_from_weather__(weather, location=location)
def get_forecast_in_days (self, offset_by_days, location=None):
if offset_by_days is 0:
return self.get_today_forecast(location)
if self.is_available() is False:
return None