From bf7eeecbe0f77cec11844c392b3b62eecb5b96aa Mon Sep 17 00:00:00 2001 From: ChuckBuilds <33324927+ChuckBuilds@users.noreply.github.com> Date: Sat, 19 Apr 2025 17:09:05 -0500 Subject: [PATCH] Fix weather location configuration. Update WeatherManager to use correct location from config and add validation. --- src/weather_manager.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/weather_manager.py b/src/weather_manager.py index c8ff7c79..c0e995f0 100644 --- a/src/weather_manager.py +++ b/src/weather_manager.py @@ -114,7 +114,11 @@ class WeatherManager: try: # Fetch new data from OpenWeatherMap API api_key = self.weather_config.get('api_key') - location = self.weather_config.get('location') + location = self.location.get('city') # Get city from location config + if not location: + self.logger.error("No location configured for weather") + return None + units = self.weather_config.get('units', 'imperial') # Fetch current weather