The NWS issues weather alerts to warn the public about hazardous conditions — everything from a Tornado Warning to a Winter Storm Watch to a Dense Fog Advisory. GodotNWS fetches all active alerts for the county zone associated with your configured location and returns them as an array of typedDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/OdintheDoggo/GodotNWS/llms.txt
Use this file to discover all available pages before exploring further.
Alert resources.
Location setup must complete before calling this method. See the Location Setup guide and wait for
location_setup_complete.Fetching Alerts
CallNws.fetch_alerts(). When the NWS responds, the alerts_fetched signal fires with an Array[Alert]. If there are no active alerts, the array will be empty — always handle that case gracefully.
Alert Time Fields
All time fields on anAlert are Godot datetime dictionaries produced by Time.get_datetime_dict_from_datetime_string(). Each dictionary contains these keys:
| Key | Type | Description |
|---|---|---|
year | int | Four-digit year |
month | int | Month (1–12) |
day | int | Day of the month (1–31) |
hour | int | Hour in 24-hour format (0–23) |
minute | int | Minute (0–59) |
second | int | Second (0–59) |
weekday | int | Day of week (0 = Sunday … 6 = Saturday) |
dst | bool | Whether daylight saving time was active |
The
ends field may be empty ({}) — NWS does not always provide a hard end time. Always check A.ends.is_empty() before reading it. expires is always populated.Alert Supersession
Alerts are sometimes updated or cancelled by newer alerts. GodotNWS exposes the full supersession chain through two fields:references— anArray[String]containing the IDs of earlier alerts that this alert updates or supersedes. If a player has already displayed one of those alerts, this alert is the newer version.replacedBy— theidof the alert that replaced this one, if applicable. Check this field to know whether the alert you have is still current.replacedAt— aStringcontaining the time this alert was replaced (as returned by the NWS API).
Alert Fields Reference
| Field | Type | Description |
|---|---|---|
raw | Dictionary | Complete raw JSON properties from the NWS API. |
id | String | Unique NWS identifier for this alert. |
event | String | Alert type title, e.g. "Tornado Warning", "Flood Watch". |
status | String | "Actual" for real alerts; "Test" or "Exercise" otherwise. |
messageType | String | "Alert", "Update", or "Cancel". |
category | String | Broad category, e.g. "Met" (meteorological). |
severity | String | One of "Extreme", "Severe", "Moderate", "Minor", "Unknown". |
certainty | String | One of "Observed", "Likely", "Possible", "Unlikely", "Unknown". |
urgency | String | One of "Immediate", "Expected", "Future", "Past", "Unknown". |
sender | String | Sending organization’s email address. |
senderName | String | Human-readable name of the issuing office, e.g. "NWS Philadelphia PA". |
headline | String | Short summary sentence. |
capitalHeadline | String | NWS NWSheadline parameter — slightly different phrasing, relevant in some contexts. |
description | String | Full alert body text describing the hazard in detail. |
instruction | String | What people should do in response. May be empty. |
response | String | Short recommended action, e.g. "Shelter", "Evacuate", "Monitor". |
sent | Dictionary | When the alert message was transmitted (datetime dict). |
effective | Dictionary | When the alert became effective (datetime dict). |
onset | Dictionary | When the hazardous conditions are expected to begin (datetime dict). |
expires | Dictionary | When the alert expires (datetime dict). Always present. |
ends | Dictionary | Hard end time for the event, if provided (datetime dict). May be {}. |
references | Array[String] | IDs of previous alerts this one updates. Empty if none. |
replacedBy | String | ID of the alert that replaced this one. Empty if current. |
replacedAt | String | Raw timestamp string of when replacement occurred. |