|
|
@ -59,8 +59,14 @@ def tooltipPrinter(r_dict): |
|
|
condition = f"Current Condition: {info['textDescription']}" |
|
|
condition = f"Current Condition: {info['textDescription']}" |
|
|
temp = f"Temp: {rounding(convertToF(info['temperature']['value']))} F" |
|
|
temp = f"Temp: {rounding(convertToF(info['temperature']['value']))} F" |
|
|
humidity = f"Humidity: {rounding(info['relativeHumidity']['value'])}%" |
|
|
humidity = f"Humidity: {rounding(info['relativeHumidity']['value'])}%" |
|
|
|
|
|
# If no windSpeed, NWS returns "None". |
|
|
|
|
|
if (not info['windSpeed']['value']): |
|
|
|
|
|
windSpeed = 0 |
|
|
|
|
|
windDirection = 0 |
|
|
|
|
|
else: |
|
|
windSpeed = rounding(convertToMPH(info['windSpeed']['value'])) |
|
|
windSpeed = rounding(convertToMPH(info['windSpeed']['value'])) |
|
|
windDirection = info['windDirection']['value'] |
|
|
windDirection = info['windDirection']['value'] |
|
|
|
|
|
|
|
|
windData = f"Wind: {windSpeed} MPH, {convertCompass(windDirection)}, {windDirection} degrees" |
|
|
windData = f"Wind: {windSpeed} MPH, {convertCompass(windDirection)}, {windDirection} degrees" |
|
|
precipitation = f"Precipitation (3 Hrs.): {info['precipitationLast3Hours']['value']}" |
|
|
precipitation = f"Precipitation (3 Hrs.): {info['precipitationLast3Hours']['value']}" |
|
|
result = f"<tool>{stationName}\n{condition} \n{temp} \n{windData} \n{humidity} \n{precipitation}</tool>" |
|
|
result = f"<tool>{stationName}\n{condition} \n{temp} \n{windData} \n{humidity} \n{precipitation}</tool>" |
|
|
|