Added icon for weather status

This commit is contained in:
Notoric 2024-06-02 02:21:47 +01:00
parent 55788fb3e6
commit ad4be5b6eb
2 changed files with 4 additions and 0 deletions

View File

@ -89,6 +89,8 @@ def get_weather():
if data['visibility'] < 6000: if data['visibility'] < 6000:
response['fog'] = "true" response['fog'] = "true"
response['icon'] = f"https://openweathermap.org/img/wn/{data['weather'][0]['icon']}@2x.png"
print("Weather data retrieved!") print("Weather data retrieved!")
return response return response

View File

@ -113,6 +113,8 @@ def get_weather():
if data['visibility'] < 6000: if data['visibility'] < 6000:
response['fog'] = "true" response['fog'] = "true"
response['icon'] = f"https://openweathermap.org/img/wn/{data['weather'][0]['icon']}@2x.png"
print("Weather data retrieved!") print("Weather data retrieved!")
return response return response