diff --git a/SkywarnPlus.py b/SkywarnPlus.py index c635b85..b2ca2b8 100644 --- a/SkywarnPlus.py +++ b/SkywarnPlus.py @@ -375,10 +375,16 @@ def get_alerts(countyCodes): LOGGER.debug("getAlerts: Using effective time for alerting") time_type_start = "effective" time_type_end = "expires" - else: + elif timetype_mode == "onset": LOGGER.debug("getAlerts: Using onset time for alerting") time_type_start = "onset" time_type_end = "ends" + else: + LOGGER.error( + "getAlerts: Invalid TimeType specified in config.yaml. Using onset time instead." + ) + time_type_start = "onset" + time_type_end = "ends" for countyCode in countyCodes: url = "https://api.weather.gov/alerts/active?zone={}".format(countyCode)