From ad4be5b6ebc3d0d0110fe7e2c458980006368bf5 Mon Sep 17 00:00:00 2001 From: Notoric Date: Sun, 2 Jun 2024 02:21:47 +0100 Subject: [PATCH] Added icon for weather status --- Docker/snc.py | 2 ++ script.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/Docker/snc.py b/Docker/snc.py index 753e379..2261da9 100644 --- a/Docker/snc.py +++ b/Docker/snc.py @@ -89,6 +89,8 @@ def get_weather(): if data['visibility'] < 6000: response['fog'] = "true" + response['icon'] = f"https://openweathermap.org/img/wn/{data['weather'][0]['icon']}@2x.png" + print("Weather data retrieved!") return response diff --git a/script.py b/script.py index 8da66a7..792fab7 100644 --- a/script.py +++ b/script.py @@ -113,6 +113,8 @@ def get_weather(): if data['visibility'] < 6000: response['fog'] = "true" + response['icon'] = f"https://openweathermap.org/img/wn/{data['weather'][0]['icon']}@2x.png" + print("Weather data retrieved!") return response