about summary refs log tree commit diff
path: root/meteor.py
diff options
context:
space:
mode:
authorStarfall <us@starfall.systems>2022-12-01 14:39:20 -0600
committerStarfall <us@starfall.systems>2022-12-01 14:39:20 -0600
commit6ac9e5a9ef85e8dbd754770a7c9619c9e34ef05b (patch)
treedbcb0902e65fc4687232db562ba35b15822e7d87 /meteor.py
parenta0ccca8329d1e9b91e06ef1b7f58fdb09c6f6564 (diff)
add grid location to forecast header
Diffstat (limited to 'meteor.py')
-rwxr-xr-xmeteor.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/meteor.py b/meteor.py
index 0188f06..4fc5e09 100755
--- a/meteor.py
+++ b/meteor.py
@@ -57,7 +57,7 @@ def print_alerts(county, zone):
 def print_forecast(point):
     # TODO pick up gridId AFC (AER/ALU), AFG, AJK, BOX< CAE, DLH, FSD, HGX, HNX, LIX, LWX, MAF, MFR, MLB, MRX, MTR, PIH and reduce gridX and gridY by 1 - known issue
 
-    cache_key = f'{point.get("gridId")}-{point.get("gridX")}-{point.get("gridY")}'
+    cache_key = f'{point.get("gridId")}-{point.get("gridX")},{point.get("gridY")}'
 
     try: 
         print(cache.read(cache_key))
@@ -73,7 +73,7 @@ def print_forecast(point):
         # but there's also relativeHumidity, apparentTemperature (and, separately, windChill), skyCover, windGust
         # downside, it appears to always convert the F/mph measurements into C/kph for no reason. e.g. all temps are measured in 9ths of C
 
-        buffer = f'{term.BOLD}forecast for {point.get("relativeLocation").get("city")}, {point.get("relativeLocation").get("state")}'
+        buffer = f'{term.BOLD}forecast for {point.get("relativeLocation").get("city")}, {point.get("relativeLocation").get("state")} ({cache_key})'
         buffer += '\n' + f'===================={term.RESET}'
         periods = forecast.get('periods')
         # print today and tonight in long format