From f61ba7c1afd09e56a105ff6e00883a0a8693371c Mon Sep 17 00:00:00 2001 From: SpudGunMan Date: Tue, 10 Dec 2024 16:03:42 -0800 Subject: [PATCH] testSAME logic --- modules/locationdata.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/locationdata.py b/modules/locationdata.py index 278c7b6..535d4fa 100644 --- a/modules/locationdata.py +++ b/modules/locationdata.py @@ -490,8 +490,12 @@ def getIpawsAlert(lat=0, lon=0): if geocode_type == "SAME": sameVal = geocode_value - - print(f"Debug iPAWS: Type:{alertType} Code:{alertCode} Desc:{areaDesc} GeoType:{geocode_type} GeoVal:{geocode_value}") + # comma separated list of SAME codes to trigger local alert. find yours at https://www.weather.gov/nwr/counties + mySAME = 053029,053073 + if sameVal in mySAME: + print("Local Alert") + else: + print(f"Debug iPAWS: Type:{alertType} Code:{alertCode} Desc:{areaDesc} GeoType:{geocode_type} GeoVal:{geocode_value}") alert += ( info.getElementsByTagName("headline")[0].childNodes[0].nodeValue + " " +