From 5ad6dff6fbed97c16d8a5683903b689ae81365c3 Mon Sep 17 00:00:00 2001 From: Max G Date: Sat, 9 Mar 2019 15:48:31 +0100 Subject: [PATCH] Improved effiency --- Calendar/OwmForecasts.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Calendar/OwmForecasts.py b/Calendar/OwmForecasts.py index 72e0602..a234eae 100644 --- a/Calendar/OwmForecasts.py +++ b/Calendar/OwmForecasts.py @@ -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