Fix weather location configuration. Update WeatherManager to use correct location from config and add validation.

This commit is contained in:
ChuckBuilds
2025-04-19 17:09:05 -05:00
parent 4c5f1e73c5
commit bf7eeecbe0

View File

@@ -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