mirror of
https://github.com/ChuckBuilds/LEDMatrix.git
synced 2026-04-11 13:23:00 +00:00
Fix weather location configuration. Update WeatherManager to use correct location from config and add validation.
This commit is contained in:
@@ -114,7 +114,11 @@ class WeatherManager:
|
|||||||
try:
|
try:
|
||||||
# Fetch new data from OpenWeatherMap API
|
# Fetch new data from OpenWeatherMap API
|
||||||
api_key = self.weather_config.get('api_key')
|
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')
|
units = self.weather_config.get('units', 'imperial')
|
||||||
|
|
||||||
# Fetch current weather
|
# Fetch current weather
|
||||||
|
|||||||
Reference in New Issue
Block a user