extraLocation

@turnrye another thing to check out
This commit is contained in:
SpudGunMan
2025-01-05 21:50:36 -08:00
parent d689495ee7
commit d2fd133743
3 changed files with 7 additions and 1 deletions
+2
View File
@@ -138,6 +138,8 @@ riverListDefault =
wxAlertBroadcastEnabled = False
# EAS Alert Broadcast Channels
wxAlertBroadcastCh = 2
# Add extra location to the weather alert
enableExtraLocationWx = False
# Goverment IPAWS/CAP Alert Broadcast
eAlertBroadcastEnabled = False
+4 -1
View File
@@ -360,7 +360,10 @@ def getWeatherAlertsNOAA(lat=0, lon=0, useDefaultLatLon=False):
for i in alertxml.getElementsByTagName("entry"):
title = i.getElementsByTagName("title")[0].childNodes[0].nodeValue
area_desc = i.getElementsByTagName("cap:areaDesc")[0].childNodes[0].nodeValue
alerts += f"{title}. {area_desc.replace(' ', '')}\n"
if enableExtraLocationWx:
alerts += f"{title}. {area_desc.replace(' ', '')}\n"
else:
alerts += f"{title}\n"
if alerts == "" or alerts == None:
return NO_ALERTS
+1
View File
@@ -241,6 +241,7 @@ try:
mySAME = config['location'].get('mySAME', '').split(',') # default empty
forecastDuration = config['location'].getint('NOAAforecastDuration', 4) # NOAA forcast days
numWxAlerts = config['location'].getint('NOAAalertCount', 2) # default 2 alerts
enableExtraLocationWx = config['location'].getboolean('enableExtraLocationWx', False) # default False
ipawsPIN = config['location'].get('ipawsPIN', '000000') # default 000000
ignoreFEMAtest = config['location'].getboolean('ignoreFEMAtest', True) # default True
wxAlertBroadcastChannel = config['location'].get('wxAlertBroadcastCh', '2').split(',') # default Channel 2