Chutney [main]

Call new temperature endpoint

3c5404a3daad5749b16f98a6775fd27286a66156
diff --git a/chutney/weather/weather_updater.py b/chutney/weather/weather_updater.py
index ccb2af1..bf92f9a 100644
--- a/chutney/weather/weather_updater.py
+++ b/chutney/weather/weather_updater.py
@@ -15,7 +15,7 @@ class WeatherUpdater:
         lat = config['weather'].get('lat')
         lon = config['weather'].get('lon')
 
-        self.uri = f'https://{host}/api/weather?lat={lat}&lon={lon}&units=metric'
+        self.uri = f'https://{host}/api/temperature?lat={lat}&lon={lon}&units=metric'
         self.auth = (user, password)
         self.weatherTempFile = 'data/weather.tmp'
         self.weatherFile = 'data/weather.txt'
@@ -33,18 +33,7 @@ class WeatherUpdater:
         self.persistTemperature('halted')
 
     def getTemperature(self):
-        weather = self.getWeather()
-        currentWeather = list(
-            filter(
-                lambda t: t['timestep'] == 'current',
-                weather['tomorrow']['data']['timelines']
-            )
-        )
-
-        return currentWeather[0]['intervals'][0]['values']['temperature']
-
-    def getWeather(self):
-        return requests.get(self.uri, auth=self.auth, timeout=3).json()
+        return requests.get(self.uri, auth=self.auth, timeout=3).json()['temperature']
 
     def persistTemperature(self, temperature):
         with open(self.weatherTempFile, 'w') as file: