diff --git a/__pycache__/iconSelector.cpython-310.pyc b/__pycache__/iconSelector.cpython-310.pyc
new file mode 100644
index 0000000..63e0616
Binary files /dev/null and b/__pycache__/iconSelector.cpython-310.pyc differ
diff --git a/iconSelector.py b/iconSelector.py
index 8fe1b2a..afe5311 100644
--- a/iconSelector.py
+++ b/iconSelector.py
@@ -3,6 +3,7 @@ clearWords = ["clear", "sunny"]
rainWords = ["rain", "showers"]
fogWords = ["fog", "mist", "smoke"]
windWords = ["wind", "windy", "gusts"]
+cloudWords = ["cloudy", "overcast"]
def parseDescription(desc):
@@ -22,6 +23,8 @@ def parseDescription(desc):
return "fog"
elif i in windWords:
return "wind"
+ elif i in cloudWords:
+ return "cloudy"
else:
return "clear"
@@ -30,21 +33,21 @@ def parseDescription(desc):
def imageSelector(desc, timeOfDay):
match desc:
- case "Clear":
+ case "clear":
if timeOfDay == "day":
return "/smallIcons/clear-day-small.png"
else:
return "/smallIcons/clear-night-small.png"
- case "Cloudy":
+ case "cloudy":
if timeOfDay == "day":
return "/smallIcons/overcast-day-small.png"
else:
return "/smallIcons/overcast-night-small.png"
- case "Wind":
+ case "wind":
return "/smallIcons/wind-small.png"
- case "Thunderstorm":
+ case "thunderstorm":
return "/smallIcons/thunderstorms-rain-small.png"
- case "Rain":
+ case "rain":
return "/smallIcons/rain-small.png"
return "/smallIcons/code-red-small.png"
diff --git a/weather.py b/weather.py
index 3156078..97a0a8a 100644
--- a/weather.py
+++ b/weather.py
@@ -56,13 +56,14 @@ def tooltipPrinter(r_dict):
info = r_dict['properties']
# Print station name, temp, humidity, wind speed, wind direction
stationName = f"Station Name: {info['stationName']}"
+ condition = f"Current Condition: {info['textDescription']}"
temp = f"Temp: {rounding(convertToF(info['temperature']['value']))} F"
humidity = f"Humidity: {rounding(info['relativeHumidity']['value'])}%"
windSpeed = rounding(convertToMPH(info['windSpeed']['value']))
windDirection = info['windDirection']['value']
windData = f"Wind: {windSpeed} MPH, {convertCompass(windDirection)}, {windDirection} degrees"
precipitation = f"Precipitation (3 Hrs.): {info['precipitationLast3Hours']['value']}"
- result = f"{stationName} \n{temp} \n{windData} \n{humidity} \n{precipitation}"
+ result = f"{stationName}\n{condition} \n{temp} \n{windData} \n{humidity} \n{precipitation}"
return result
@@ -92,5 +93,5 @@ else:
weatherIconImage = f"/home/nclanceman/tools/weather{iconSelect.imageSelector(weatherIcon, timeOfDay)}"
# print(f" \u2601 {condition}, {roundedTemp} F")
print(
- f"
{weatherIconImage} {condition}, {roundedTemp}F")
+ f"
{weatherIconImage} {roundedTemp}F")
print(tooltipPrinter(request_json))