From 4f24701460941e135ab5bad7198aee800d5d2413 Mon Sep 17 00:00:00 2001 From: SpudGunMan Date: Wed, 7 Aug 2024 21:26:54 -0700 Subject: [PATCH] Update locationdata.py --- modules/locationdata.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/locationdata.py b/modules/locationdata.py index 575dabe..635e2b6 100644 --- a/modules/locationdata.py +++ b/modules/locationdata.py @@ -97,7 +97,10 @@ def get_weather(lat=0, lon=0, unit=0): if float(lat) == 0 and float(lon) == 0: return NO_DATA_NOGPS - # get weather data from NOAA units for metric + # get weather data from NOAA units for metric unit = 1 is metric + if use_metric: + unit = 1 + weather_url = "https://forecast.weather.gov/MapClick.php?FcstType=text&lat=" + str(lat) + "&lon=" + str(lon) if unit == 1: weather_url += "&unit=1"