From c54df673c3342ce43630f06f146c7ed165b8dd33 Mon Sep 17 00:00:00 2001 From: SpudGunMan Date: Mon, 17 Feb 2025 19:40:30 -0800 Subject: [PATCH] refactorValue --- README.md | 2 +- config.template | 4 ++-- modules/locationdata.py | 2 +- modules/settings.py | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index ec2c43b..f748653 100644 --- a/README.md +++ b/README.md @@ -213,7 +213,7 @@ This uses USA: SAME, FIPS, ZIP code to locate the alerts in the feed. By default ```ini eAlertBroadcastEnabled = False # Goverment IPAWS/CAP Alert Broadcast eAlertBroadcastCh = 2,3 # Goverment Emergency IPAWS/CAP Alert Broadcast Channels -ignoreFEMAtest = True # Ignore any headline that includes followig word list +ignoreFEMAword = True # Ignore any headline that includes followig word list ignoreFEMAwords = test,exercise # comma separated list of codes (e.g., SAME,FIPS,ZIP) trigger local alert. # find your SAME https://www.weather.gov/nwr/counties diff --git a/config.template b/config.template index d61e55c..a1784d3 100644 --- a/config.template +++ b/config.template @@ -147,8 +147,8 @@ eAlertBroadcastEnabled = False eAlertBroadcastCh = 2 # FEMA Alert Broadcast Settings -# Ignore any headline that includes followig word list -ignoreFEMAtest = True +# Enable Ignore any headline that includes followig word list +ignoreFEMAword = True ignoreFEMAwords = test,exercise # comma separated list of codes (e.g., SAME,FIPS,ZIP) trigger local alert. # find your SAME https://www.weather.gov/nwr/counties diff --git a/modules/locationdata.py b/modules/locationdata.py index 924049e..d4ae09d 100644 --- a/modules/locationdata.py +++ b/modules/locationdata.py @@ -532,7 +532,7 @@ def getIpawsAlert(lat=0, lon=0, shortAlerts = False): # check if the alert is for the current location, if wanted keep alert if (sameVal in mySAME) or (geocode_value in mySAME): # ignore the FEMA test alerts - if ignoreFEMAtest: + if ignoreFEMAword: for word in ignoreFEMAwords: if word.lower() in headline.lower(): logger.debug(f"System: Ignoring FEMA Alert: {headline} containing {word} at {areaDesc}") diff --git a/modules/settings.py b/modules/settings.py index 61b81e6..092d04f 100644 --- a/modules/settings.py +++ b/modules/settings.py @@ -257,7 +257,7 @@ try: 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 + ignoreFEMAword = config['location'].getboolean('ignoreFEMAword', True) # default True ignoreFEMAwords = config['location'].get('ignoreFEMAwords', 'test,exercise').split(',') # default test,exercise wxAlertBroadcastChannel = config['location'].get('wxAlertBroadcastCh', '2').split(',') # default Channel 2 emergencyAlertBroadcastCh = config['location'].get('eAlertBroadcastCh', '2').split(',') # default Channel 2